Exemplo n.º 1
0
 @Override
 public void rollback() {
   commitLock.writeLock().lock();
   try {
     cleanTxQueue();
     super.rollback();
     uncommitedData = false;
   } finally {
     commitLock.writeLock().unlock();
   }
 }
Exemplo n.º 2
0
 @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();
   }
 }