Berkeley DB: DbLockTab::id
Google

ee,hash,hashing,transaction,transactions,locking,logging,access method,access me thods,java,C,C++">

DbLockTab::id


#include <db_cxx.h>

int DbLockTab::id(u_int32_t *idp);

Description

The DbLockTab::id method copies a locker ID, which is guaranteed to be unique in the specified lock table, into the memory location referenced by idp.

The Berkeley DB access methods generate a unique locker ID for each file that is opened with locking. During Berkeley DB access method operation, this locker ID will be used for all lock calls unless a transaction identifier was specified for the call, in which case the transaction ID specified is used as the locker ID.

The DbLockTab::id method either returns errno or throws an exception that encapsulates an errno on failure, and 0 on success.

Errors

If a fatal error occurs in Berkeley DB, the DbLockTab::id method may fail and either return DB_RUNRECOVERY or throw an exception encapsulating DB_RUNRECOVERY, at which point all subsequent database calls will also fail in the same way. Methods marked as returning errno will, by default, throw an exception that encapsulates the error information. The default error behavior can be changed, see DbException.

The DbLockTab::id method may fail and throw an exception for any of the errors specified for the following Berkeley DB and C library functions: abort(3), fcntl(3), fprintf(3), and getpid(3).

Class

DbLockTab

See Also

DbLockTab::close, DbLockTab::detect, DbLockTab::get, DbLockTab::id, DbLockTab::open, DbLockTab::stat DbLockTab::unlink and DbLockTab::vec.