#include <db_cxx.h>int DbLockTab::get(u_int32_t locker, u_int32_t flags, const Dbt *obj, const db_lockmode_t lock_mode, DB_LOCK *lock);
The DbLockTab::get method is a simple interface to the DbLockTab::vec functionality.
It 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.
The DbLockTab::get method returns success and failure as described for the DbLockTab::vec method.
The DbLockTab::get method either returns errno or throws an exception that encapsulates an errno on failure, and 0 on success.
The DbLockTab::get 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), fflush(3), fprintf(3), fsync(3), getpid(3), DbLockTab::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 exception or return errno for the following conditions: