Class StackObjectPoolFactory<T>

    • Field Detail

      • _factory

        @Deprecated
        protected PoolableObjectFactory<T> _factory
        Deprecated.
        to be made private in pool 2.0
        The PoolableObjectFactory used by created pools.
      • _maxSleeping

        @Deprecated
        protected int _maxSleeping
        Deprecated.
        to be made private in pool 2.0
        The maximum number of idle instances in created pools.
      • _initCapacity

        @Deprecated
        protected int _initCapacity
        Deprecated.
        to be made private in pool 2.0
        The initial size of created pools.
    • Constructor Detail

      • StackObjectPoolFactory

        @Deprecated
        public StackObjectPoolFactory​(int maxIdle,
                                      int initIdleCapacity)
        Deprecated.
        Create a new StackObjectPoolFactory.
        Parameters:
        maxIdle - cap on the number of "sleeping" instances in the pool.
        initIdleCapacity - - initial size of the pool (this specifies the size of the container, it does not cause the pool to be pre-populated.)
        See Also:
        StackObjectPool(int, int)
      • StackObjectPoolFactory

        public StackObjectPoolFactory​(PoolableObjectFactory<T> factory,
                                      int maxIdle)
        Create a new StackObjectPoolFactory.
        Parameters:
        factory - the PoolableObjectFactory used by created pools.
        maxIdle - cap on the number of "sleeping" instances in the pool.
      • StackObjectPoolFactory

        public StackObjectPoolFactory​(PoolableObjectFactory<T> factory,
                                      int maxIdle,
                                      int initIdleCapacity)
        Create a new StackObjectPoolFactory.
        Parameters:
        factory - the PoolableObjectFactory used by created pools.
        maxIdle - cap on the number of "sleeping" instances in the pool.
        initIdleCapacity - - initial size of the pool (this specifies the size of the container, it does not cause the pool to be pre-populated.)
    • Method Detail

      • createPool

        public ObjectPool<T> createPool()
        Create a StackObjectPool.
        Specified by:
        createPool in interface ObjectPoolFactory<T>
        Returns:
        a new StackObjectPool with the configured factory, maxIdle and initial capacity settings
      • getFactory

        public PoolableObjectFactory<T> getFactory()
        Returns the factory used by created pools.
        Returns:
        the PoolableObjectFactory used by created pools
        Since:
        1.5.5
      • getMaxSleeping

        public int getMaxSleeping()
        Returns the maxIdle setting for created pools.
        Returns:
        the maximum number of idle instances in created pools
        Since:
        1.5.5
      • getInitCapacity

        public int getInitCapacity()
        Returns the initial capacity of created pools.
        Returns:
        size of created containers (created pools are not pre-populated)
        Since:
        1.5.5