private void preBufferAccess(){
  _mostRecentUse=System.currentTimeMillis();
  _lock.lock();
  try {
    while (_flushPending) {
      _flushComplete.await();
    }
    ensureBufferAvailable(this);
    ensureLoaded();
    _bufferUseCount++;
  }
 catch (  Exception e) {
    throw Throwables.propagate(e);
  }
 finally {
    _lock.unlock();
  }
}

private void preBufferAccess ( ) { _mostRecentUse = System . currentTimeMillis ( ) ; _lock . lock ( ) ; try { while ( _flushPending ) { _flushComplete . await ( ) ; } ensureBufferAvailable ( this ) ; ensureLoaded ( ) ; _bufferUseCount ++ ; } catch ( Exception e ) { throw Throwables . propagate ( e ) ; } finally { _lock . unlock ( ) ; } }
called prior to reading from or writing to the block . ensures that all of the following are satisfied : 1 . block access will not be attempted while a flush is pending or taking place 2 . prevents a flush from starting until the block access is complete 3 . ensures that the block is loaded and ready for access
