Collaboration diagram for Locking:
![]() |
Functions | |
static concurrency_t | ss_m::xct_lock_level () |
Get the locking granularity for the attached transaction. | |
static void | ss_m::set_xct_lock_level (concurrency_t l) |
Set the default locking level for the attached transaction. | |
static rc_t | ss_m::lock (const lockid_t &n, lock_mode_t m, lock_duration_t d=t_long, timeout_in_ms timeout=WAIT_SPECIFIED_BY_XCT) |
Acquire a lock. | |
static rc_t | ss_m::unlock (const lockid_t &n) |
Release a lock. | |
static rc_t | ss_m::dont_escalate (const lockid_t &n, bool passOnToDescendants=true) |
Disable lock escalation on the given entity. | |
static rc_t | ss_m::get_escalation_thresholds (w_base_t::int4_t &toPage, w_base_t::int4_t &toStore, w_base_t::int4_t &toVolume) |
Find the storage-manager-wide escalation thresholds
Default values (used for all transactions until they change their per-transaction thresholds) are determined by the storage-manager-wide options. See List of Run-Time Options. | |
static rc_t | ss_m::set_escalation_thresholds (w_base_t::int4_t toPage, w_base_t::int4_t toStore, w_base_t::int4_t toVolume) |
Change the storage-manager-wide escalation thresholds
Default values (used for all transactions until they change their per-transaction thresholds) are determined by the storage-manager-wide options. See List of Run-Time Options. | |
static rc_t | ss_m::query_lock (const lockid_t &n, lock_mode_t &m, bool implicit=false) |
Find out if the attached transaction has an entity locked. | |
static rc_t | ss_m::set_lock_cache_enable (bool enable) |
Control lock caching for attached transaction. | |
static rc_t | ss_m::lock_cache_enabled (bool &enabled) |
True if lock cache is enabled for the attached transaction. |
static void ss_m::set_xct_lock_level | ( | concurrency_t | l | ) | [static, inherited] |
Set the default locking level for the attached transaction.
[in] | l | The level to use for the balance of this transaction. Legitimate values are t_cc_record, t_cc_page, t_cc_file. |
static rc_t ss_m::lock | ( | const lockid_t & | n, | |
lock_mode_t | m, | |||
lock_duration_t | d = t_long , |
|||
timeout_in_ms | timeout = WAIT_SPECIFIED_BY_XCT | |||
) | [static, inherited] |
Acquire a lock.
[in] | n | Lock id of the entity to lock. There are conversions from record ids, volume ids, store ids, and page ids to lockid_t. |
[in] | m | Desired lock mode. Values: EX, SH. |
[in] | d | Desired duration. Values:
|
[in] | timeout | Milliseconds willing to block. See timeout_in_ms. |
Durations other than long and instant are not well-tested.
Release a lock.
[in] | n | Lock id of the entity to lock. There are conversions from record ids, volume ids, store ids, and page ids to lockid_t. |
static rc_t ss_m::dont_escalate | ( | const lockid_t & | n, | |
bool | passOnToDescendants = true | |||
) | [static, inherited] |
Disable lock escalation on the given entity.
[in] | n | Lock id of the entity to lock. There are conversions from record ids, volume ids, store ids, and page ids to lockid_t. |
[in] | passOnToDescendants | If true, apply this to the descendants of n. |
static rc_t ss_m::query_lock | ( | const lockid_t & | n, | |
lock_mode_t & | m, | |||
bool | implicit = false | |||
) | [static, inherited] |
Find out if the attached transaction has an entity locked.
[in] | n | Lock id of the entity to lock. There are conversions from record ids, volume ids, store ids, and page ids to lockid_t. |
[out] | m | Mode of lock held. NL if none. |
[in] | implicit | If "true" the query will returns a lock mode if an implicit lock is held, otherwise the lock must be held explicitly. |
static rc_t ss_m::set_lock_cache_enable | ( | bool | enable | ) | [static, inherited] |
Control lock caching for attached transaction.
[in] | enable | Set to true if you want to turn on lock caching for the attached transaction. The default is that it is turned on. |
static rc_t ss_m::lock_cache_enabled | ( | bool & | enabled | ) | [static, inherited] |
True if lock cache is enabled for the attached transaction.
[out] | enabled | Will be set to true if the attached transaction has lock caching enabled, false otherwise. |