Interface AgroalConnectionPoolConfiguration


public interface AgroalConnectionPoolConfiguration
The configuration of the connection pool.
Author:
Luis Barreiro
  • Method Details

    • connectionFactoryConfiguration

      AgroalConnectionFactoryConfiguration connectionFactoryConfiguration()
      Configuration for the connection factory.
    • connectionValidator

      The connection validation method. Allows customization of the validation operation.
    • exceptionSorter

      Allows a custom exception sorter. This determines if a connection is still usable after an exception.
    • connectionCache

      ConnectionCache connectionCache()
      Customizable strategy for connection caching.
    • transactionIntegration

      TransactionIntegration transactionIntegration()
      The transaction layer integration to use.
    • transactionRequirement

      Requires connections to be enlisted into a transaction.
    • idleValidationTimeout

      Duration idleValidationTimeout()
      Connections idle for longer than this time period are validated before being acquired (foreground validation). A duration of Duration.ZERO means that a this feature is disabled.
    • leakTimeout

      Duration leakTimeout()
      Connections acquired for longer than this time period may be reported as leaking. A duration of Duration.ZERO means that a this feature is disabled.
    • validationTimeout

      Duration validationTimeout()
      Connections idle for longer than this time period are validated (background validation). A duration of Duration.ZERO means that a this feature is disabled.
    • reapTimeout

      Duration reapTimeout()
      Connections idle for longer than this time period are flushed from the pool. A duration of Duration.ZERO means that a this feature is disabled.
    • maxLifetime

      Duration maxLifetime()
      Connections that are older than this time period are flushed from the pool. A duration of Duration.ZERO means that a this feature is disabled.
    • enhancedLeakReport

      boolean enhancedLeakReport()
      Provides detailed insights of the connection status when it's reported as a leak (as INFO messages on AgroalDataSourceListener).
    • flushOnClose

      boolean flushOnClose()
      If connections should be flushed when returning to the pool.
    • multipleAcquisition

      Behaviour when a thread tries to acquire multiple connections.
    • initialSize

      int initialSize()
      The number of connections to be created when the pool starts. Can be smaller than min or bigger than max.
    • minSize

      int minSize()
      The minimum number of connections on the pool. If the pool has to flush connections it may create connections to keep this amount.
    • setMinSize

      void setMinSize(int size)
      Sets a new minimum number of connections on the pool. When this value increase the pool may temporarily have less connections than the minimum.
    • maxSize

      int maxSize()
      The maximum number of connections on the pool. When the number of acquired connections is equal to this value, further requests will block.
    • setMaxSize

      void setMaxSize(int size)
      Sets a new maximum number of connections on the pool. When this value decreases the pool may temporarily have more connections than the maximum.
    • acquisitionTimeout

      Duration acquisitionTimeout()
      The maximum amount of time a thread may be blocked waiting for a connection. If this time expires and still no connection is available, an exception is thrown. A duration of Duration.ZERO means that a thread will wait indefinitely. In Pool-less this timeout can add to AgroalConnectionFactoryConfiguration.loginTimeout().
    • setAcquisitionTimeout

      void setAcquisitionTimeout(Duration timeout)
      Sets a new amount of time a thread may be blocked. Threads already blocked when this value changes do not see the new value when they unblock. A duration of Duration.ZERO means that a thread will wait indefinitely.