Zero  0.1.0
Public Member Functions | Public Attributes | List of all members
lil_private_table Class Reference

LIL private lock table to remember all locks in xct. More...

#include <lock_lil.h>

Public Member Functions

 lil_private_table ()
 
 ~lil_private_table ()
 
void clear ()
 
w_rc_t acquire_vol_table (lil_global_table *global_table, uint16_t vid, lil_lock_modes_t mode, lil_private_vol_table *&table)
 
w_rc_t get_vol_table_nolock (lil_global_table *global_table, uint16_t vid, lil_private_vol_table *&table)
 
w_rc_t acquire_vol_store_lock (lil_global_table *global_table, const StoreID &stid, lil_lock_modes_t mode)
 
void release_all_locks (lil_global_table *global_table, bool read_lock_only=false, lsn_t commit_lsn=lsn_t::null)
 
lil_private_vol_tablefind_vol_table (uint16_t vid)
 

Public Attributes

uint16_t _volumes
 
uint16_t _unused1
 
uint32_t _unused2
 
lil_private_vol_table _vol_tables [MAX_VOL_PER_XCT]
 

Detailed Description

LIL private lock table to remember all locks in xct.

Constructor & Destructor Documentation

§ lil_private_table()

lil_private_table::lil_private_table ( )
inline

§ ~lil_private_table()

lil_private_table::~lil_private_table ( )
inline

Member Function Documentation

§ acquire_vol_store_lock()

w_rc_t lil_private_table::acquire_vol_store_lock ( lil_global_table global_table,
const StoreID stid,
lil_lock_modes_t  mode 
)

Shortcut method to acquire store and its volume lock in the same mode.

§ acquire_vol_table()

w_rc_t lil_private_table::acquire_vol_table ( lil_global_table global_table,
uint16_t  vid,
lil_lock_modes_t  mode,
lil_private_vol_table *&  table 
)

Get a lock on volume and return the private lock table for it.

Parameters
[in]global_tableaccesses this global table to acuiqre lock
[in]vidID of the volume to access
[in]modelock mode
[out]tableprivate lock table for the volume

§ clear()

void lil_private_table::clear ( )
inline

§ find_vol_table()

lil_private_vol_table * lil_private_table::find_vol_table ( uint16_t  vid)

Returns a volume lock table for the given volume id.

§ get_vol_table_nolock()

w_rc_t lil_private_table::get_vol_table_nolock ( lil_global_table global_table,
uint16_t  vid,
lil_private_vol_table *&  table 
)

Returns a volume lock table assuming

§ release_all_locks()

void lil_private_table::release_all_locks ( lil_global_table global_table,
bool  read_lock_only = false,
lsn_t  commit_lsn = lsn_t::null 
)

Release all locks acquired by the current transaction and resets the private table. This never fails or takes long time.

Parameters
[in]read_lock_onlyif true, releases only read locks. default false.

Member Data Documentation

§ _unused1

uint16_t lil_private_table::_unused1

§ _unused2

uint32_t lil_private_table::_unused2

§ _vol_tables

lil_private_vol_table lil_private_table::_vol_tables[MAX_VOL_PER_XCT]

§ _volumes

uint16_t lil_private_table::_volumes

The documentation for this class was generated from the following files: