CUBRID Engine
latest
|
#include <lockfree_transaction_descriptor.hpp>
Public Member Functions | |
descriptor () | |
~descriptor () | |
void | retire_node (reclaimable_node &hzp) |
void | set_table (table &tbl) |
void | start_tran () |
void | start_tran_and_increment_id () |
void | end_tran () |
bool | is_tran_started () const |
id | get_transaction_id () const |
void | reclaim_retired_list () |
void | save_reclaimable (reclaimable_node *&node) |
reclaimable_node * | pull_saved_reclaimable () |
size_t | get_total_retire_count () const |
size_t | get_total_reclaim_count () const |
size_t | get_current_retire_count () const |
Private Member Functions | |
void | reclaim_retired_head () |
Private Attributes | |
table * | m_table |
id | m_tranid |
id | m_last_reclaim_minid |
reclaimable_node * | m_retired_head |
reclaimable_node * | m_retired_tail |
bool | m_did_incr |
reclaimable_node * | m_saved_node |
size_t | m_retire_count |
size_t | m_reclaim_count |
Definition at line 51 of file lockfree_transaction_descriptor.hpp.
lockfree::tran::descriptor::descriptor | ( | ) |
Definition at line 30 of file lockfree_transaction_descriptor.cpp.
lockfree::tran::descriptor::~descriptor | ( | ) |
Definition at line 43 of file lockfree_transaction_descriptor.cpp.
References assert, is_tran_started(), m_retired_head, m_saved_node, NULL, lockfree::tran::reclaimable_node::reclaim(), and reclaim_retired_head().
void lockfree::tran::descriptor::end_tran | ( | ) |
Definition at line 117 of file lockfree_transaction_descriptor.cpp.
References assert, lockfree::tran::INVALID_TRANID, is_tran_started(), m_did_incr, and m_tranid.
Referenced by lockfree::tran::table::end_tran(), lockfree::hashmap< Key, T >::end_tran(), lockfree::hashmap< Key, T >::end_tran_force(), lockfree::hashmap< Key, T >::end_tran_if_started(), lockfree::hashmap< Key, T >::freelist_claim(), lockfree::hashmap< Key, T >::iterator::iterate(), lockfree::hashmap< Key, T >::list_find(), lockfree::hashmap< Key, T >::iterator::restart(), retire_node(), and lockfree::hashmap< Key, T >::unlock().
size_t lockfree::tran::descriptor::get_current_retire_count | ( | ) | const |
Definition at line 196 of file lockfree_transaction_descriptor.cpp.
References m_reclaim_count, and m_retire_count.
Referenced by lockfree::tran::table::get_current_retire_count().
size_t lockfree::tran::descriptor::get_total_reclaim_count | ( | ) | const |
Definition at line 190 of file lockfree_transaction_descriptor.cpp.
References m_reclaim_count.
Referenced by lockfree::tran::table::get_total_reclaim_count().
size_t lockfree::tran::descriptor::get_total_retire_count | ( | ) | const |
Definition at line 184 of file lockfree_transaction_descriptor.cpp.
References m_retire_count.
Referenced by lockfree::tran::table::get_total_retire_count().
id lockfree::tran::descriptor::get_transaction_id | ( | ) | const |
Definition at line 125 of file lockfree_transaction_descriptor.cpp.
References m_tranid.
Referenced by lockfree::tran::table::compute_min_active_tranid().
bool lockfree::tran::descriptor::is_tran_started | ( | ) | const |
Definition at line 111 of file lockfree_transaction_descriptor.cpp.
References lockfree::tran::INVALID_TRANID, and m_tranid.
Referenced by end_tran(), lockfree::hashmap< Key, T >::end_tran_force(), lockfree::hashmap< Key, T >::end_tran_if_started(), lockfree::hashmap< Key, T >::freelist_claim(), lockfree::hashmap< Key, T >::list_insert_internal(), lockfree::hashmap< Key, T >::promote_tran_force(), lockfree::hashmap< Key, T >::iterator::restart(), retire_node(), lockfree::hashmap< Key, T >::safeguard_use_mutex_or_tran_started(), start_tran(), lockfree::hashmap< Key, T >::start_tran_force(), and ~descriptor().
reclaimable_node * lockfree::tran::descriptor::pull_saved_reclaimable | ( | ) |
Definition at line 176 of file lockfree_transaction_descriptor.cpp.
References m_saved_node, and NULL.
Referenced by lockfree::hashmap< Key, T >::claim_temporary(), and lockfree::hashmap< Key, T >::freelist_claim().
|
private |
Definition at line 152 of file lockfree_transaction_descriptor.cpp.
References assert, m_reclaim_count, m_retired_head, lockfree::tran::reclaimable_node::m_retired_next, m_retired_tail, NULL, and lockfree::tran::reclaimable_node::reclaim().
Referenced by reclaim_retired_list(), and ~descriptor().
void lockfree::tran::descriptor::reclaim_retired_list | ( | ) |
Definition at line 131 of file lockfree_transaction_descriptor.cpp.
References lockfree::tran::table::get_min_active_tranid(), m_last_reclaim_minid, lockfree::tran::reclaimable_node::m_retire_tranid, m_retired_head, m_retired_tail, m_table, NULL, and reclaim_retired_head().
Referenced by lockfree::freelist< T >::claim(), and retire_node().
void lockfree::tran::descriptor::retire_node | ( | reclaimable_node & | hzp | ) |
Definition at line 63 of file lockfree_transaction_descriptor.cpp.
References assert, end_tran(), is_tran_started(), m_retire_count, lockfree::tran::reclaimable_node::m_retire_tranid, m_retired_head, lockfree::tran::reclaimable_node::m_retired_next, m_retired_tail, m_tranid, NULL, reclaim_retired_list(), and start_tran_and_increment_id().
Referenced by lockfree::freelist< T >::retire().
void lockfree::tran::descriptor::save_reclaimable | ( | reclaimable_node *& | node | ) |
Definition at line 168 of file lockfree_transaction_descriptor.cpp.
References assert, m_saved_node, and NULL.
Referenced by lockfree::hashmap< Key, T >::save_temporary().
void lockfree::tran::descriptor::set_table | ( | table & | tbl | ) |
Definition at line 57 of file lockfree_transaction_descriptor.cpp.
References m_table.
Referenced by lockfree::tran::table::table().
void lockfree::tran::descriptor::start_tran | ( | ) |
Definition at line 92 of file lockfree_transaction_descriptor.cpp.
References lockfree::tran::table::get_current_global_tranid(), is_tran_started(), m_table, and m_tranid.
Referenced by lockfree::freelist< T >::claim(), lockfree::hashmap< Key, T >::freelist_claim(), lockfree::hashmap< Key, T >::iterator::iterate(), lockfree::hashmap< Key, T >::list_find(), lockfree::tran::table::start_tran(), lockfree::hashmap< Key, T >::start_tran(), lockfree::hashmap< Key, T >::start_tran_force(), and lockfree::hashmap< Key, T >::start_tran_if_not_started().
void lockfree::tran::descriptor::start_tran_and_increment_id | ( | ) |
Definition at line 101 of file lockfree_transaction_descriptor.cpp.
References assert, lockfree::tran::table::get_new_global_tranid(), lockfree::tran::INVALID_TRANID, m_did_incr, m_table, and m_tranid.
Referenced by lockfree::hashmap< Key, T >::promote_tran_force(), and retire_node().
|
private |
Definition at line 90 of file lockfree_transaction_descriptor.hpp.
Referenced by end_tran(), and start_tran_and_increment_id().
|
private |
Definition at line 87 of file lockfree_transaction_descriptor.hpp.
Referenced by reclaim_retired_list().
|
private |
Definition at line 96 of file lockfree_transaction_descriptor.hpp.
Referenced by get_current_retire_count(), get_total_reclaim_count(), and reclaim_retired_head().
|
private |
Definition at line 95 of file lockfree_transaction_descriptor.hpp.
Referenced by get_current_retire_count(), get_total_retire_count(), and retire_node().
|
private |
Definition at line 88 of file lockfree_transaction_descriptor.hpp.
Referenced by reclaim_retired_head(), reclaim_retired_list(), retire_node(), and ~descriptor().
|
private |
Definition at line 89 of file lockfree_transaction_descriptor.hpp.
Referenced by reclaim_retired_head(), reclaim_retired_list(), and retire_node().
|
private |
Definition at line 92 of file lockfree_transaction_descriptor.hpp.
Referenced by pull_saved_reclaimable(), save_reclaimable(), and ~descriptor().
|
private |
Definition at line 85 of file lockfree_transaction_descriptor.hpp.
Referenced by reclaim_retired_list(), set_table(), start_tran(), and start_tran_and_increment_id().
|
private |
Definition at line 86 of file lockfree_transaction_descriptor.hpp.
Referenced by end_tran(), get_transaction_id(), is_tran_started(), retire_node(), start_tran(), and start_tran_and_increment_id().