@Override public void rollback() { commitLock.writeLock().lock(); try { cleanTxQueue(); super.rollback(); uncommitedData = false; } finally { commitLock.writeLock().unlock(); } }
@Override public Engine snapshot() { commitLock.writeLock().lock(); try { cleanTxQueue(); if (uncommitedData && canRollback()) throw new IllegalAccessError("Can not create snapshot with uncommited data"); return new Tx(); } finally { commitLock.writeLock().unlock(); } }