(I)Berkeley DB: DbLockTab::id[P

DbLockTab::id





#include <db_cxx.h>

intDbLockTab::id(u_int32_t *idp);





Description



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

MThe Berkeley DB access methods generate a unique locker ID for each file thatPis opened with locking. During Berkeley DB access method operation, this lockerFID will be used for all lock calls unless a transaction identifier wasJspecified for the call, in which case the transaction ID specified is usedas 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

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

The DbLockTab::id&method may fail and throw an exceptionKfor 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

BDbLockTab::close,DDbLockTab::detect,>DbLockTab::get,DbLockTab::id,@DbLockTab::open,?DbLockTab::statCDbLockTab::unlinkand>DbLockTab::vec.
ÿÿ