Class CommonsPoolTargetSource

    • Method Detail

      • setMaxIdle

        public void setMaxIdle​(int maxIdle)
        Deprecated.
        Set the maximum number of idle objects in the pool. Default is 8.
        See Also:
        GenericObjectPool.setMaxIdle(int)
      • getMaxIdle

        public int getMaxIdle()
        Deprecated.
        Return the maximum number of idle objects in the pool.
      • setMinIdle

        public void setMinIdle​(int minIdle)
        Deprecated.
        Set the minimum number of idle objects in the pool. Default is 0.
        See Also:
        GenericObjectPool.setMinIdle(int)
      • getMinIdle

        public int getMinIdle()
        Deprecated.
        Return the minimum number of idle objects in the pool.
      • setMaxWait

        public void setMaxWait​(long maxWait)
        Deprecated.
        Set the maximum waiting time for fetching an object from the pool. Default is -1, waiting forever.
        See Also:
        GenericObjectPool.setMaxWait(long)
      • getMaxWait

        public long getMaxWait()
        Deprecated.
        Return the maximum waiting time for fetching an object from the pool.
      • setTimeBetweenEvictionRunsMillis

        public void setTimeBetweenEvictionRunsMillis​(long timeBetweenEvictionRunsMillis)
        Deprecated.
        Set the time between eviction runs that check idle objects whether they have been idle for too long or have become invalid. Default is -1, not performing any eviction.
        See Also:
        GenericObjectPool.setTimeBetweenEvictionRunsMillis(long)
      • setMinEvictableIdleTimeMillis

        public void setMinEvictableIdleTimeMillis​(long minEvictableIdleTimeMillis)
        Deprecated.
        Set the minimum time that an idle object can sit in the pool before it becomes subject to eviction. Default is 1800000 (30 minutes).

        Note that eviction runs need to be performed to take this setting into effect.

        See Also:
        setTimeBetweenEvictionRunsMillis(long), GenericObjectPool.setMinEvictableIdleTimeMillis(long)
      • getMinEvictableIdleTimeMillis

        public long getMinEvictableIdleTimeMillis()
        Deprecated.
        Return the minimum time that an idle object can sit in the pool.
      • setWhenExhaustedActionName

        public void setWhenExhaustedActionName​(String whenExhaustedActionName)
        Deprecated.
        Set the action to take when the pool is exhausted. Uses the constant names defined in Commons Pool's GenericObjectPool class: "WHEN_EXHAUSTED_BLOCK", "WHEN_EXHAUSTED_FAIL", "WHEN_EXHAUSTED_GROW".
        See Also:
        setWhenExhaustedAction(byte)
      • setWhenExhaustedAction

        public void setWhenExhaustedAction​(byte whenExhaustedAction)
        Deprecated.
        Set the action to take when the pool is exhausted. Uses the constant values defined in Commons Pool's GenericObjectPool class.
        See Also:
        GenericObjectPool.setWhenExhaustedAction(byte), GenericObjectPool.WHEN_EXHAUSTED_BLOCK, GenericObjectPool.WHEN_EXHAUSTED_FAIL, GenericObjectPool.WHEN_EXHAUSTED_GROW
      • getWhenExhaustedAction

        public byte getWhenExhaustedAction()
        Deprecated.
        Return the action to take when the pool is exhausted.
      • createObjectPool

        protected org.apache.commons.pool.ObjectPool createObjectPool()
        Deprecated.
        Subclasses can override this if they want to return a specific Commons pool. They should apply any configuration properties to the pool here.

        Default is a GenericObjectPool instance with the given pool size.

        Returns:
        an empty Commons ObjectPool.
        See Also:
        GenericObjectPool, AbstractPoolingTargetSource.setMaxSize(int)
      • destroy

        public void destroy()
                     throws Exception
        Deprecated.
        Closes the underlying ObjectPool when destroying this object.
        Specified by:
        destroy in interface DisposableBean
        Throws:
        Exception - in case of shutdown errors. Exceptions will get logged but not rethrown to allow other beans to release their resources as well.
      • destroyObject

        public void destroyObject​(Object obj)
                           throws Exception
        Deprecated.
        Specified by:
        destroyObject in interface org.apache.commons.pool.PoolableObjectFactory
        Throws:
        Exception
      • validateObject

        public boolean validateObject​(Object obj)
        Deprecated.
        Specified by:
        validateObject in interface org.apache.commons.pool.PoolableObjectFactory
      • activateObject

        public void activateObject​(Object obj)
        Deprecated.
        Specified by:
        activateObject in interface org.apache.commons.pool.PoolableObjectFactory
      • passivateObject

        public void passivateObject​(Object obj)
        Deprecated.
        Specified by:
        passivateObject in interface org.apache.commons.pool.PoolableObjectFactory