void tryToDrainBuffers(){
  if (evictionLock.tryLock()) {
    try {
      drainStatus.lazySet(PROCESSING);
      drainBuffers();
    }
  finally {
      drainStatus.compareAndSet(PROCESSING,IDLE);
      evictionLock.unlock();
    }
  }
}

void tryToDrainBuffers ( ) { if ( evictionLock . tryLock ( ) ) { try { drainStatus . lazySet ( PROCESSING ) ; drainBuffers ( ) ; } finally { drainStatus . compareAndSet ( PROCESSING , IDLE ) ; evictionLock . unlock ( ) ; } } }
attempts to acquire the eviction lock and apply the pending operations , up to the amortized threshold , to the page replacement policy .
