Library Version 12.1.6.2

Chapter 6. The DB_LOCK Handle
Prev |  | Next

## Chapter 6. The DB_LOCK Handle

    #include <db.h>

    typedef struct __db_lock_u DB_LOCK;

The locking interfaces for the Berkeley DB database environment are methods of the DB_ENV handle. The `DB_LOCK` object is the handle for a single lock, and has no methods of its own.

## Locking Subsystem and Related Methods

Locking Subsystem and Related Methods | Description
--- | ---
DB_ENV->lock_detect() | Perform deadlock detection
DB_ENV->lock_get() | Acquire a lock
DB_ENV->lock_id() | Acquire a locker ID
DB_ENV->lock_id_free() | Release a locker ID
DB_ENV->lock_put() | Release a lock
DB_ENV->lock_stat() | Return lock subsystem statistics
DB_ENV->lock_stat_print() | Print lock subsystem statistics
DB_ENV->lock_vec() | Acquire/release locks
DB_ENV->cdsgroup_begin() | Get a locker ID in Berkeley DB Concurrent Data Store
Locking Subsystem Configuration
DB_ENV->set_timeout(), DB_ENV->get_timeout() | Set/get lock and transaction timeout
DB_ENV->set_lk_conflicts(), DB_ENV->get_lk_conflicts() | Set/get lock conflicts matrix
DB_ENV->set_lk_detect(), DB_ENV->get_lk_detect() | Set/get automatic deadlock detection
DB_ENV->set_lk_max_lockers(), DB_ENV->get_lk_max_lockers() | Set/get maximum number of lockers
DB_ENV->set_lk_max_locks(), DB_ENV->get_lk_max_locks() | Set/get maximum number of locks
DB_ENV->set_lk_max_objects(), DB_ENV->get_lk_max_objects() | Set/get maximum number of lock objects
DB_ENV->set_lk_partitions(), DB_ENV->get_lk_partitions() | Set/get number of lock partitions
DB_ENV->set_lk_priority(), DB_ENV->get_lk_priority() | Set/get a locker's deadlock priority
DB_ENV->set_lk_tablesize(), DB_ENV->get_lk_tablesize() | Set/get size of the lock object hash table

Prev |  | Next
db_version | Home | DB_ENV->get_lk_conflicts()