|
Zero
0.1.0
|
The means of identifying a desired or held lock. More...
#include <lock_s.h>
Public Member Functions | |
| bool | operator< (lockid_t const &p) const |
| comparison operator for lockid_t, used by lock manager More... | |
| bool | operator== (const lockid_t &p) const |
| equality operator for lockid_t More... | |
| bool | operator!= (const lockid_t &p) const |
| inequality operator for lockid_t More... | |
| uint32_t | hash () const |
| Used by lock cache. More... | |
| void | zero () |
| clear out the lockid - initialize to mean nothing More... | |
| StoreID | store () const |
| extract store number lockid whose lspace() == t_store or has parent with lspace() == t_store More... | |
| lockid_t () | |
| lockid_t (StoreID stid, const unsigned char *keystr, int16_t keylen) | |
| construct from key string in an index More... | |
| lockid_t (StoreID stid, const w_keystr_t &key) | |
| construct from key string in an index More... | |
| lockid_t (const lockid_t &i) | |
| copy constructor More... | |
| lockid_t & | operator= (const lockid_t &i) |
| copy operator More... | |
Private Member Functions | |
| void | set_store (StoreID s) |
| void | _init_for_str (StoreID stid, const unsigned char *keystr, int16_t keylen) |
| uint64_t | hash64 (uint32_t seed, const unsigned char *str, int16_t len) |
Private Attributes | |
| union { | |
| uint64_t l [2] | |
| uint32_t w [4] | |
| }; | |
Friends | |
| ostream & | operator<< (ostream &o, const lockid_t &i) |
The means of identifying a desired or held lock.
Lock manager requests (acquire, release, query) take an argument of this kind to identify the entity to be locked.
Currently, we have only lockid_t made from key. No other lock type exists in the main lock table. For intent locks, we use LIL (light-weight intent lock) which are separated from the main lock table. So, this object is drastically simplified from original Shore-MT.
|
inline |
|
inline |
construct from key string in an index
|
inline |
construct from key string in an index
|
inline |
copy constructor
|
inlineprivate |
|
inline |
Used by lock cache.
|
inlineprivate |
|
inline |
comparison operator for lockid_t, used by lock manager
|
inlineprivate |
|
inline |
extract store number lockid whose lspace() == t_store or has parent with lspace() == t_store
|
inline |
clear out the lockid - initialize to mean nothing
|
friend |
| union { ... } |
l and w are for convenience w[0] == vol w[1] == store w[2,3]== l[1] == key (its hash)
| uint64_t lockid_t::l[2] |
| uint32_t lockid_t::w[4] |
1.8.12