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

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

Close the database handle.

Exceptions:
VillaException if an error occurs.
Note:
Updating a database is assured to be written when the handle is closed. If a writer opens a database but does not close it appropriately, the database will be broken. If the transaction is activated and not committed, it is aborted.

Reimplemented from qdbm::ADBM.

Definition at line 225 of file Villa.java.

References index.

Referenced by qdbm::VillaTester::domulti(), qdbm::VillaTester::doread(), and qdbm::VillaTester::dowrite().

                                            {
    if(index < 0) throw new VillaException();
    synchronized(ADBM.class){
      int rv = vlclose(index);
      index = -1;
      if(rv == 0) throw new VillaException(vlecode());
    }
  }


Generated by  Doxygen 1.6.0   Back to index