Berkeley DB: DbLockTab::get
Полезная информация Кованые мангалы купить кованый мангал


#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.


If a fatal error occurs in Berkeley DB, the DbLockTab::get 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::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:

An invalid flag value or parameter was specified.



See Also

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