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 .