org.apache.commons.pool2.impl.EvictionConfig Java Examples

The following examples show how to use org.apache.commons.pool2.impl.EvictionConfig. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OneNetPoolEvictionPolicy.java    From one-net with Apache License 2.0 5 votes vote down vote up
@Override
public boolean evict(EvictionConfig config, PooledObject<Channel> underTest,
                     int idleCount) {

   if(super.evict(config,underTest,idleCount)){
       log.debug("Pool object eviction check failed.");
       return true;
   }
   if(!underTest.getObject().isOpen()){
       log.debug("Pool object eviction check failed.");
       return true;
   }
   log.debug("Pool object eviction check pass.");
   return false;
}
 
Example #2
Source File: DefaultSessionPool.java    From cyberduck with GNU General Public License v3.0 4 votes vote down vote up
@Override
public boolean evict(final EvictionConfig config, final PooledObject<Session<?>> underTest, final int idleCount) {
    log.warn(String.format("Evict idle session %s from pool", underTest));
    return true;
}
 
Example #3
Source File: DummyEvictionPolicy.java    From spring-ldap with Apache License 2.0 4 votes vote down vote up
/**
 * @see EvictionPolicy#evict(EvictionConfig, PooledObject, int)
 *
 * */
@Override
public boolean evict(EvictionConfig config, PooledObject underTest, int idleCount) {
    return false;
}