proxygen
folly::detail::concurrenthashmap::NodeT< KeyType, ValueType, Allocator, Atom > Class Template Reference

#include <ConcurrentHashMap-detail.h>

Inheritance diagram for folly::detail::concurrenthashmap::NodeT< KeyType, ValueType, Allocator, Atom >:
folly::hazptr_obj_base_linked< NodeT< KeyType, ValueType, Allocator, Atom >, Atom, concurrenthashmap::HazptrDeleter< Allocator > > folly::hazptr_obj_linked< Atom > folly::hazptr_deleter< NodeT< KeyType, ValueType, Allocator, Atom >, concurrenthashmap::HazptrDeleter< Allocator > > folly::hazptr_obj< Atom >

Public Types

typedef std::pair< const KeyType, ValueType > value_type
 

Public Member Functions

 NodeT (NodeT *other)
 
template<typename Arg , typename... Args>
 NodeT (Arg &&k, Args &&...args)
 
void release ()
 
value_typegetItem ()
 
template<typename S >
void push_links (bool m, S &s)
 
- Public Member Functions inherited from folly::hazptr_obj_base_linked< NodeT< KeyType, ValueType, Allocator, Atom >, Atom, concurrenthashmap::HazptrDeleter< Allocator > >
void retire ()
 
void unlink ()
 
void unlink_and_reclaim_unchecked ()
 
- Public Member Functions inherited from folly::hazptr_obj_linked< Atom >
void acquire_link () noexcept
 
void acquire_link_safe () noexcept
 
void acquire_ref () noexcept
 
void acquire_ref_safe () noexcept
 
- Public Member Functions inherited from folly::hazptr_obj< Atom >
 hazptr_obj () noexcept
 
 hazptr_obj (const hazptr_obj< Atom > &) noexcept
 
 hazptr_obj (hazptr_obj< Atom > &&) noexcept
 
hazptr_obj< Atom > & operator= (const hazptr_obj< Atom > &) noexcept
 
hazptr_obj< Atom > & operator= (hazptr_obj< Atom > &&) noexcept
 
- Public Member Functions inherited from folly::hazptr_deleter< NodeT< KeyType, ValueType, Allocator, Atom >, concurrenthashmap::HazptrDeleter< Allocator > >
void set_deleter (concurrenthashmap::HazptrDeleter< Allocator >d={})
 
void delete_obj (NodeT< KeyType, ValueType, Allocator, Atom > *p)
 

Public Attributes

Atom< NodeT * > next_ {nullptr}
 

Private Attributes

ValueHolder< KeyType, ValueType, Allocator > item_
 

Detailed Description

template<typename KeyType, typename ValueType, typename Allocator, template< typename > class Atom = std::atomic>
class folly::detail::concurrenthashmap::NodeT< KeyType, ValueType, Allocator, Atom >

Definition at line 126 of file ConcurrentHashMap-detail.h.

Member Typedef Documentation

template<typename KeyType , typename ValueType , typename Allocator , template< typename > class Atom = std::atomic>
typedef std::pair<const KeyType, ValueType> folly::detail::concurrenthashmap::NodeT< KeyType, ValueType, Allocator, Atom >::value_type

Definition at line 131 of file ConcurrentHashMap-detail.h.

Constructor & Destructor Documentation

template<typename KeyType , typename ValueType , typename Allocator , template< typename > class Atom = std::atomic>
folly::detail::concurrenthashmap::NodeT< KeyType, ValueType, Allocator, Atom >::NodeT ( NodeT< KeyType, ValueType, Allocator, Atom > *  other)
inlineexplicit

Definition at line 133 of file ConcurrentHashMap-detail.h.

References testing::Args().

133  : item_(other->item_) {
134  this->set_deleter( // defined in hazptr_obj
135  concurrenthashmap::HazptrDeleter<Allocator>());
136  this->acquire_link_safe(); // defined in hazptr_obj_base_linked
137  }
ValueHolder< KeyType, ValueType, Allocator > item_
void acquire_link_safe() noexcept
template<typename KeyType , typename ValueType , typename Allocator , template< typename > class Atom = std::atomic>
template<typename Arg , typename... Args>
folly::detail::concurrenthashmap::NodeT< KeyType, ValueType, Allocator, Atom >::NodeT ( Arg &&  k,
Args &&...  args 
)
inline

Definition at line 140 of file ConcurrentHashMap-detail.h.

141  : item_(
142  std::piecewise_construct,
143  std::forward<Arg>(k),
144  std::forward<Args>(args)...) {
145  this->set_deleter( // defined in hazptr_obj
146  concurrenthashmap::HazptrDeleter<Allocator>());
147  this->acquire_link_safe(); // defined in hazptr_obj_base_linked
148  }
ValueHolder< KeyType, ValueType, Allocator > item_
void acquire_link_safe() noexcept
KeyT k

Member Function Documentation

template<typename KeyType , typename ValueType , typename Allocator , template< typename > class Atom = std::atomic>
value_type& folly::detail::concurrenthashmap::NodeT< KeyType, ValueType, Allocator, Atom >::getItem ( )
inline

Definition at line 154 of file ConcurrentHashMap-detail.h.

154  {
155  return item_.getItem();
156  }
ValueHolder< KeyType, ValueType, Allocator > item_
template<typename KeyType , typename ValueType , typename Allocator , template< typename > class Atom = std::atomic>
template<typename S >
void folly::detail::concurrenthashmap::NodeT< KeyType, ValueType, Allocator, Atom >::push_links ( bool  m,
S s 
)
inline

Definition at line 159 of file ConcurrentHashMap-detail.h.

159  {
160  if (m) {
161  auto p = next_.load(std::memory_order_acquire);
162  if (p) {
163  s.push(p);
164  }
165  }
166  }
static map< string, int > m
static set< string > s
template<typename KeyType , typename ValueType , typename Allocator , template< typename > class Atom = std::atomic>
void folly::detail::concurrenthashmap::NodeT< KeyType, ValueType, Allocator, Atom >::release ( )
inline

Member Data Documentation

template<typename KeyType , typename ValueType , typename Allocator , template< typename > class Atom = std::atomic>
ValueHolder<KeyType, ValueType, Allocator> folly::detail::concurrenthashmap::NodeT< KeyType, ValueType, Allocator, Atom >::item_
private

Definition at line 171 of file ConcurrentHashMap-detail.h.


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