public void evict() throws Exception {
  assertOpen();
  boolean isEmpty;
synchronized (this) {
    isEmpty=pool.isEmpty();
  }
  if (!isEmpty) {
    if (softMinEvictableIdleTimeMillis > 0) {
      int numToEvict=getNumIdle() - getMinIdle();
      evict(System.currentTimeMillis() - softMinEvictableIdleTimeMillis,numToEvict);
    }
    if (minEvictableIdleTimeMillis > 0) {
      int numToEvict=getNumIdle();
      evict(System.currentTimeMillis() - minEvictableIdleTimeMillis,numToEvict);
    }
  }
}

public void evict ( ) throws Exception { assertOpen ( ) ; boolean isEmpty ; synchronized ( this ) { isEmpty = pool . isEmpty ( ) ; } if ( ! isEmpty ) { if ( softMinEvictableIdleTimeMillis > 0 ) { int numToEvict = getNumIdle ( ) - getMinIdle ( ) ; evict ( System . currentTimeMillis ( ) - softMinEvictableIdleTimeMillis , numToEvict ) ; } if ( minEvictableIdleTimeMillis > 0 ) { int numToEvict = getNumIdle ( ) ; evict ( System . currentTimeMillis ( ) - minEvictableIdleTimeMillis , numToEvict ) ; } } }
make one pass of the idle object evictor .
