Class DynamicResourcePool.Options

  • Enclosing class:
    DynamicResourcePool<T>

    public static final class DynamicResourcePool.Options
    extends java.lang.Object
    Options to initialize a Dynamic resource pool.
    • Method Detail

      • getMaxCapacity

        public int getMaxCapacity()
        Returns:
        the max capacity
      • getMinCapacity

        public int getMinCapacity()
        Returns:
        the min capacity
      • getInitialDelayMs

        public long getInitialDelayMs()
        Returns:
        the initial delay
      • getGcIntervalMs

        public long getGcIntervalMs()
        Returns:
        the gc interval
      • getGcExecutor

        public java.util.concurrent.ScheduledExecutorService getGcExecutor()
        Returns:
        the gc executor
      • getFIFO

        public boolean getFIFO()
        Returns:
        if resources are returned in a FIFO manner
      • setFIFO

        public DynamicResourcePool.Options setFIFO​(boolean fifo)
        Parameters:
        fifo - if resources should be returned in a FIFO manner
        Returns:
        the updated object
      • setMaxCapacity

        public DynamicResourcePool.Options setMaxCapacity​(int maxCapacity)
        Parameters:
        maxCapacity - the max capacity
        Returns:
        the updated object
      • setMinCapacity

        public DynamicResourcePool.Options setMinCapacity​(int minCapacity)
        Parameters:
        minCapacity - the min capacity
        Returns:
        the updated object
      • setInitialDelayMs

        public DynamicResourcePool.Options setInitialDelayMs​(long initialDelayMs)
        Parameters:
        initialDelayMs - the initial delay
        Returns:
        the updated object
      • setGcIntervalMs

        public DynamicResourcePool.Options setGcIntervalMs​(long gcIntervalMs)
        Parameters:
        gcIntervalMs - the gc interval
        Returns:
        the updated object
      • setGcExecutor

        public DynamicResourcePool.Options setGcExecutor​(java.util.concurrent.ScheduledExecutorService gcExecutor)
        Parameters:
        gcExecutor - the gc executor
        Returns:
        updated object