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

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

Commit the transaction.

Exceptions:
VillaException if an error occurs.
Note:
Updating a database in the transaction is fixed when it is committed successfully. Any other thread except for the one which began the transaction should not call this method.

Definition at line 636 of file Villa.java.

References index, tran, and tranmonitor.

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

                                                 {
    if(index < 0) throw new VillaException();
    synchronized(ADBM.class){
      if(vltrancommit(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