public void rollback(){
  final WriteLock lock=_fieldReadWriteLock.writeLock();
  lock.lock();
  try {
    assertOpen();
    if (isReadOnly())     throw new IllegalStateException();
    txLog.warn("ROLLBACK");
    final ByteBuffer buf=_bufferStrategy.readRootBlock(!_rootBlock.isRootBlock0());
    final IRootBlockView newRootBlock=new RootBlockView(_rootBlock.isRootBlock0(),buf,checker);
    _bufferStrategy.writeRootBlock(newRootBlock,forceOnCommit);
    _rootBlock=newRootBlock;
    abort();
    historicalIndexCache.clear();
    indexCache.clear();
  }
  finally {
    lock.unlock();
  }
}

public void rollback ( ) { final WriteLock lock = _fieldReadWriteLock . writeLock ( ) ; lock . lock ( ) ; try { assertOpen ( ) ; if ( isReadOnly ( ) ) throw new IllegalStateException ( ) ; txLog . warn ( "ROLLBACK" ) ; final ByteBuffer buf = _bufferStrategy . readRootBlock ( ! _rootBlock . isRootBlock0 ( ) ) ; final IRootBlockView newRootBlock = new RootBlockView ( _rootBlock . isRootBlock0 ( ) , buf , checker ) ; _bufferStrategy . writeRootBlock ( newRootBlock , forceOnCommit ) ; _rootBlock = newRootBlock ; abort ( ) ; historicalIndexCache . clear ( ) ; indexCache . clear ( ) ; } finally { lock . unlock ( ) ; } }
rollback a journal to its previous commit point . < p > note : you must have an exclusive write lock on the journal . < p > note : to restore the last root block we copy the alternative root block over the current root block . that gives us two identical root blocks and restores us to the root block that was in effect before the last commit .
