@Override protected boolean ensureFreeCapacity(){
  if (!isFull())   return true;
  EvictionThread evictionThread=ensureEvictionThreadIsRunning();
  evictionThread.trigger();
  if (isOverfull()) {
    counterEvictionsHalts.incrementAndGet();
    if (jamPolicy == JamPolicy.DROP) {
      evictionThread=ensureEvictionThreadIsRunning();
      evictionThread.trigger();
      return false;
    }
  }
  while (isOverfull()) {
    try {
synchronized (evictionNotifierDone) {
        if (evictionThread.evictionIsRunning) {
          evictionNotifierDone.wait();
        }
      }
      evictionThread=ensureEvictionThreadIsRunning();
      evictionThread.trigger();
    }
 catch (    InterruptedException e) {
    }
  }
  return true;
}

@ Override protected boolean ensureFreeCapacity ( ) { if ( ! isFull ( ) ) return true ; EvictionThread evictionThread = ensureEvictionThreadIsRunning ( ) ; evictionThread . trigger ( ) ; if ( isOverfull ( ) ) { counterEvictionsHalts . incrementAndGet ( ) ; if ( jamPolicy == JamPolicy . DROP ) { evictionThread = ensureEvictionThreadIsRunning ( ) ; evictionThread . trigger ( ) ; return false ; } } while ( isOverfull ( ) ) { try { synchronized ( evictionNotifierDone ) { if ( evictionThread . evictionIsRunning ) { evictionNotifierDone . wait ( ) ; } } evictionThread = ensureEvictionThreadIsRunning ( ) ; evictionThread . trigger ( ) ; } catch ( InterruptedException e ) { } } return true ; }
frees entries , if the cache is near full .
