Logo Search packages:      
Sourcecode: qdbm version File versions  Download package

void Villa::tranabort (  )  throws VillaException [inline]

Abort the transaction.

Exceptions:
VillaException if an error occurs.
Note:
Updating a database in the transaction is discarded when it is aborted. The state of the database is rollbacked to before transaction. Any other thread except for the one which began the transaction should not call this method.

Definition at line 659 of file Villa.java.

References index, tran, and tranmonitor.

Referenced by qdbm::VillaTester::run().

                                                {
    if(index < 0) throw new VillaException();
    synchronized(ADBM.class){
      if(vltranabort(index) == 0){
        synchronized(tranmonitor){
          tran = false;
          tranmonitor.notify();
        }
        throw new VillaException(vlecode());
      }
    }
    synchronized(tranmonitor){
      tran = false;
      tranmonitor.notify();
    }
  }


Generated by  Doxygen 1.6.0   Back to index