private void notifyEvictionIfNeeded(){
  if (shouldEvict()) {
    evictLock.lock();
    try {
      nothingToEvict.signal();
    }
  finally {
      evictLock.unlock();
    }
  }
}

private void notifyEvictionIfNeeded ( ) { if ( shouldEvict ( ) ) { evictLock . lock ( ) ; try { nothingToEvict . signal ( ) ; } finally { evictLock . unlock ( ) ; } } }
checks if the eviction should start , and if it does notifies the right thread .
