类 CommonsPoolTargetSource

    • 方法详细资料

      • setMaxIdle

        public void setMaxIdle​(int maxIdle)
        已过时。
        Set the maximum number of idle objects in the pool. Default is 8.
        另请参阅:
        GenericObjectPool.setMaxIdle(int)
      • getMaxIdle

        public int getMaxIdle()
        已过时。
        Return the maximum number of idle objects in the pool.
      • setMinIdle

        public void setMinIdle​(int minIdle)
        已过时。
        Set the minimum number of idle objects in the pool. Default is 0.
        另请参阅:
        GenericObjectPool.setMinIdle(int)
      • getMinIdle

        public int getMinIdle()
        已过时。
        Return the minimum number of idle objects in the pool.
      • setMaxWait

        public void setMaxWait​(long maxWait)
        已过时。
        Set the maximum waiting time for fetching an object from the pool. Default is -1, waiting forever.
        另请参阅:
        GenericObjectPool.setMaxWait(long)
      • getMaxWait

        public long getMaxWait()
        已过时。
        Return the maximum waiting time for fetching an object from the pool.
      • setTimeBetweenEvictionRunsMillis

        public void setTimeBetweenEvictionRunsMillis​(long timeBetweenEvictionRunsMillis)
        已过时。
        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.
        另请参阅:
        GenericObjectPool.setTimeBetweenEvictionRunsMillis(long)
      • setMinEvictableIdleTimeMillis

        public void setMinEvictableIdleTimeMillis​(long minEvictableIdleTimeMillis)
        已过时。
        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.

        另请参阅:
        setTimeBetweenEvictionRunsMillis(long), GenericObjectPool.setMinEvictableIdleTimeMillis(long)
      • getMinEvictableIdleTimeMillis

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

        public void setWhenExhaustedActionName​(String whenExhaustedActionName)
        已过时。
        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".
        另请参阅:
        setWhenExhaustedAction(byte)
      • setWhenExhaustedAction

        public void setWhenExhaustedAction​(byte whenExhaustedAction)
        已过时。
        Set the action to take when the pool is exhausted. Uses the constant values defined in Commons Pool's GenericObjectPool class.
        另请参阅:
        GenericObjectPool.setWhenExhaustedAction(byte), GenericObjectPool.WHEN_EXHAUSTED_BLOCK, GenericObjectPool.WHEN_EXHAUSTED_FAIL, GenericObjectPool.WHEN_EXHAUSTED_GROW
      • getWhenExhaustedAction

        public byte getWhenExhaustedAction()
        已过时。
        Return the action to take when the pool is exhausted.
      • createObjectPool

        protected org.apache.commons.pool.ObjectPool createObjectPool()
        已过时。
        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.

        返回:
        an empty Commons ObjectPool.
        另请参阅:
        GenericObjectPool, AbstractPoolingTargetSource.setMaxSize(int)
      • destroy

        public void destroy()
                     throws Exception
        已过时。
        Closes the underlying ObjectPool when destroying this object.
        指定者:
        destroy 在接口中 DisposableBean
        抛出:
        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
        已过时。
        指定者:
        destroyObject 在接口中 org.apache.commons.pool.PoolableObjectFactory
        抛出:
        Exception
      • validateObject

        public boolean validateObject​(Object obj)
        已过时。
        指定者:
        validateObject 在接口中 org.apache.commons.pool.PoolableObjectFactory
      • activateObject

        public void activateObject​(Object obj)
        已过时。
        指定者:
        activateObject 在接口中 org.apache.commons.pool.PoolableObjectFactory
      • passivateObject

        public void passivateObject​(Object obj)
        已过时。
        指定者:
        passivateObject 在接口中 org.apache.commons.pool.PoolableObjectFactory