Module lettuce.core

Class BoundedPoolConfig

java.lang.Object
io.lettuce.core.support.BasePoolConfig
io.lettuce.core.support.BoundedPoolConfig

public class BoundedPoolConfig
extends BasePoolConfig
Configuration for asynchronous pooling using BoundedAsyncPool. Instances can be created through a builder().
Since:
5.1
Author:
Mark Paluch
See Also:
BoundedAsyncPool
  • Field Details

    • DEFAULT_MAX_TOTAL

      public static final int DEFAULT_MAX_TOTAL
      The default value for the maxTotal configuration attribute.
      See Also:
      Constant Field Values
    • DEFAULT_MAX_IDLE

      public static final int DEFAULT_MAX_IDLE
      The default value for the maxIdle configuration attribute.
      See Also:
      Constant Field Values
    • DEFAULT_MIN_IDLE

      public static final int DEFAULT_MIN_IDLE
      The default value for the minIdle configuration attribute.
      See Also:
      Constant Field Values
  • Constructor Details

    • BoundedPoolConfig

      protected BoundedPoolConfig​(boolean testOnCreate, boolean testOnAcquire, boolean testOnRelease, int maxTotal, int maxIdle, int minIdle)
  • Method Details

    • builder

      public static BoundedPoolConfig.Builder builder()
      Returns:
      a new BoundedPoolConfig.Builder for BoundedPoolConfig.
    • create

      public static BoundedPoolConfig create()
    • getMaxTotal

      public int getMaxTotal()
      Get the value for the maxTotal configuration attribute for pools created with this configuration instance.
      Returns:
      the current setting of maxTotal for this configuration instance.
    • getMaxIdle

      public int getMaxIdle()
      Get the value for the maxIdle configuration attribute for pools created with this configuration instance.
      Returns:
      the current setting of maxIdle for this configuration instance.
    • getMinIdle

      public int getMinIdle()
      Get the value for the minIdle configuration attribute for pools created with this configuration instance.
      Returns:
      the current setting of minIdle for this configuration instance.