)I*Berkeley DB: DbLockTab::get[P

DbLockTab::get





#include <db_cxx.h>

int1DbLockTab::get(u_int32_t locker, u_int32_t flags,B const Dbt *obj, const db_lockmode_t lock_mode, DB_LOCK *lock);





Description



tThe DbLockTab::get method is a simple interface to the DbLockTab::vecfunctionality.

mIt is equivalent to calling the DbLockTab::vec method with the>locker and flags arguments, and a single element@list array, for which the op field is DB_LOCK_GET,?and the obj, lock_mode and lock fields are.represented by the arguments of the same name.

FThe DbLockTab::get method returns success and failure as described forIthe DbLockTab::vec method.

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



Errors

UIf a fatal error occurs in Berkeley DB, the DbLockTab::get 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::get&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), fflush(3), fprintf(3), fsync(3), getpid(3),DDbLockTab::detect, lseek(3), memcpy(3), memset(3),mmap(3), munmap(3),pstat_getdynamic(3), shmat(3), shmdt(3), strerror(3), sysconf(3), vfprintf(3), vsnprintf(3),and write(3).

In addition, the DbLockTab::get&method may fail and throw an exceptionor return errnofor the following conditions:

B

EINVAL
An invalid flag value or parameter was specified.







Class

:DbLockTab



See Also

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