Interface AgroalConnectionPoolConfiguration


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

      • transactionIntegration

        TransactionIntegration transactionIntegration()
        The transaction layer integration to use.
      • 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.
      • 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.
      • 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.