CUBRID Engine  latest
cubthread::lockfree_hashmap< Key, T > Class Template Reference

#include <thread_lockfree_hash_map.hpp>

Inheritance diagram for cubthread::lockfree_hashmap< Key, T >:
Inheritance graph
Collaboration diagram for cubthread::lockfree_hashmap< Key, T >:
Collaboration graph

Classes

class  iterator
 

Public Member Functions

 lockfree_hashmap ()
 
void init (lf_tran_system &transys, int entry_idx, int hash_size, int freelist_block_size, int freelist_block_count, lf_entry_descriptor &edesc)
 
void init_as_old (lf_tran_system &transys, int hash_size, int freelist_block_count, int freelist_block_size, lf_entry_descriptor &edesc, int entry_idx)
 
void init_as_new (lockfree::tran::system &transys, size_t hash_size, size_t freelist_block_size, size_t freelist_block_count, lf_entry_descriptor &edesc)
 
void destroy ()
 
T * find (cubthread::entry *thread_p, Key &key)
 
bool find_or_insert (cubthread::entry *thread_p, Key &key, T *&t)
 
bool insert (cubthread::entry *thread_p, Key &key, T *&t)
 
bool insert_given (cubthread::entry *thread_p, Key &key, T *&t)
 
bool erase (cubthread::entry *thread_p, Key &key)
 
bool erase_locked (cubthread::entry *thread_p, Key &key, T *&t)
 
void unlock (cubthread::entry *thread_p, T *&t)
 
void clear (cubthread::entry *thread_p)
 
T * freelist_claim (cubthread::entry *thread_p)
 
void freelist_retire (cubthread::entry *thread_p, T *&t)
 
void start_tran (cubthread::entry *thread_p)
 
void end_tran (cubthread::entry *thread_p)
 
size_t get_size () const
 
size_t get_element_count () const
 

Private Types

enum  type { OLD, NEW, UNKNOWN }
 

Private Member Functions

bool is_old_type () const
 
lf_tran_entryget_tran_entry (cubthread::entry *thread_p)
 

Private Attributes

lf_hash_table_cpp< Key, T > m_old_hash
 
lockfree::hashmap< Key, T > m_new_hash
 
type m_type
 
int m_entry_idx
 

Detailed Description

template<class Key, class T>
class cubthread::lockfree_hashmap< Key, T >

Definition at line 35 of file thread_lockfree_hash_map.hpp.

Member Enumeration Documentation

template<class Key, class T>
enum cubthread::lockfree_hashmap::type
private
Enumerator
OLD 
NEW 
UNKNOWN 

Definition at line 75 of file thread_lockfree_hash_map.hpp.

Constructor & Destructor Documentation

Member Function Documentation

template<class Key , class T >
void cubthread::lockfree_hashmap< Key, T >::clear ( cubthread::entry thread_p)

Definition at line 240 of file thread_lockfree_hash_map.hpp.

References lockfree_hashmap_forward_func_noarg.

Referenced by catalog_clear_hash_table(), and fpcache_drop_all().

Here is the caller graph for this function:

template<class Key , class T >
void cubthread::lockfree_hashmap< Key, T >::end_tran ( cubthread::entry thread_p)

Definition at line 268 of file thread_lockfree_hash_map.hpp.

References lockfree_hashmap_forward_func_noarg.

Referenced by session_remove_expired_sessions(), and spage_free_saved_spaces().

Here is the caller graph for this function:

template<class Key, class T >
bool cubthread::lockfree_hashmap< Key, T >::erase ( cubthread::entry thread_p,
Key &  key 
)

Definition at line 219 of file thread_lockfree_hash_map.hpp.

References lockfree_hashmap_forward_func.

Referenced by catalog_delete_key(), and session_remove_expired_sessions().

Here is the caller graph for this function:

template<class Key, class T>
bool cubthread::lockfree_hashmap< Key, T >::erase_locked ( cubthread::entry thread_p,
Key &  key,
T *&  t 
)

Definition at line 226 of file thread_lockfree_hash_map.hpp.

References lockfree_hashmap_forward_func.

Referenced by dwb_slots_hash_delete(), session_state_destroy(), and spage_free_saved_spaces().

Here is the caller graph for this function:

template<class Key, class T>
bool cubthread::lockfree_hashmap< Key, T >::find_or_insert ( cubthread::entry thread_p,
Key &  key,
T *&  t 
)
template<class Key , class T >
T * cubthread::lockfree_hashmap< Key, T >::freelist_claim ( cubthread::entry thread_p)

Definition at line 247 of file thread_lockfree_hash_map.hpp.

References lockfree_hashmap_forward_func_noarg.

template<class Key , class T>
void cubthread::lockfree_hashmap< Key, T >::freelist_retire ( cubthread::entry thread_p,
T *&  t 
)

Definition at line 254 of file thread_lockfree_hash_map.hpp.

References lockfree_hashmap_forward_func.

template<class Key , class T >
size_t cubthread::lockfree_hashmap< Key, T >::get_element_count ( ) const
template<class Key , class T >
lf_tran_entry * cubthread::lockfree_hashmap< Key, T >::get_tran_entry ( cubthread::entry thread_p)
private
template<class Key , class T >
void cubthread::lockfree_hashmap< Key, T >::init ( lf_tran_system transys,
int  entry_idx,
int  hash_size,
int  freelist_block_size,
int  freelist_block_count,
lf_entry_descriptor edesc 
)
template<class Key , class T >
void cubthread::lockfree_hashmap< Key, T >::init_as_new ( lockfree::tran::system transys,
size_t  hash_size,
size_t  freelist_block_size,
size_t  freelist_block_count,
lf_entry_descriptor edesc 
)
template<class Key , class T >
void cubthread::lockfree_hashmap< Key, T >::init_as_old ( lf_tran_system transys,
int  hash_size,
int  freelist_block_count,
int  freelist_block_size,
lf_entry_descriptor edesc,
int  entry_idx 
)
template<class Key, class T>
bool cubthread::lockfree_hashmap< Key, T >::insert ( cubthread::entry thread_p,
Key &  key,
T *&  t 
)

Definition at line 205 of file thread_lockfree_hash_map.hpp.

References lockfree_hashmap_forward_func.

Referenced by session_state_create().

Here is the caller graph for this function:

template<class Key, class T>
bool cubthread::lockfree_hashmap< Key, T >::insert_given ( cubthread::entry thread_p,
Key &  key,
T *&  t 
)

Definition at line 212 of file thread_lockfree_hash_map.hpp.

References lockfree_hashmap_forward_func.

template<class Key , class T >
void cubthread::lockfree_hashmap< Key, T >::start_tran ( cubthread::entry thread_p)

Definition at line 261 of file thread_lockfree_hash_map.hpp.

References lockfree_hashmap_forward_func_noarg.

Referenced by spage_free_saved_spaces().

Here is the caller graph for this function:

template<class Key , class T>
void cubthread::lockfree_hashmap< Key, T >::unlock ( cubthread::entry thread_p,
T *&  t 
)

Definition at line 233 of file thread_lockfree_hash_map.hpp.

References lockfree_hashmap_forward_func.

Referenced by catalog_get_dir_oid_from_cache(), and catalog_get_representation_item().

Here is the caller graph for this function:

Member Data Documentation

template<class Key, class T>
int cubthread::lockfree_hashmap< Key, T >::m_entry_idx
private

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