proxygen
folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator Class Reference

#include <ConcurrentHashMap-detail.h>

Public Member Functions

FOLLY_ALWAYS_INLINE Iterator ()
 
FOLLY_ALWAYS_INLINE Iterator (std::nullptr_t)
 
FOLLY_ALWAYS_INLINE ~Iterator ()
 
void setNode (Node *node, Buckets *buckets, size_t bucket_count, uint64_t idx)
 
const value_typeoperator* () const
 
const value_typeoperator-> () const
 
const Iteratoroperator++ ()
 
void next ()
 
bool operator== (const Iterator &o) const
 
bool operator!= (const Iterator &o) const
 
Iteratoroperator= (const Iterator &o)=delete
 
Iteratoroperator= (Iterator &&o) noexcept
 
 Iterator (const Iterator &o)=delete
 
 Iterator (Iterator &&o) noexcept
 

Public Attributes

hazptr_array< 3, Atomhazptrs_
 

Private Attributes

Nodenode_ {nullptr}
 
Bucketsbuckets_ {nullptr}
 
size_t bucket_count_ {0}
 
uint64_t idx_ {0}
 

Detailed Description

template<typename KeyType, typename ValueType, uint8_t ShardBits = 0, typename HashFn = std::hash<KeyType>, typename KeyEqual = std::equal_to<KeyType>, typename Allocator = std::allocator<uint8_t>, template< typename > class Atom = std::atomic, class Mutex = std::mutex>
class folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator

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

Constructor & Destructor Documentation

template<typename KeyType , typename ValueType , uint8_t ShardBits = 0, typename HashFn = std::hash<KeyType>, typename KeyEqual = std::equal_to<KeyType>, typename Allocator = std::allocator<uint8_t>, template< typename > class Atom = std::atomic, class Mutex = std::mutex>
FOLLY_ALWAYS_INLINE folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::Iterator ( )
inline

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

702 {}
template<typename KeyType , typename ValueType , uint8_t ShardBits = 0, typename HashFn = std::hash<KeyType>, typename KeyEqual = std::equal_to<KeyType>, typename Allocator = std::allocator<uint8_t>, template< typename > class Atom = std::atomic, class Mutex = std::mutex>
FOLLY_ALWAYS_INLINE folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::Iterator ( std::nullptr_t  )
inlineexplicit

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

703 : hazptrs_(nullptr) {}
template<typename KeyType , typename ValueType , uint8_t ShardBits = 0, typename HashFn = std::hash<KeyType>, typename KeyEqual = std::equal_to<KeyType>, typename Allocator = std::allocator<uint8_t>, template< typename > class Atom = std::atomic, class Mutex = std::mutex>
FOLLY_ALWAYS_INLINE folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::~Iterator ( )
inline

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

704 {}
template<typename KeyType , typename ValueType , uint8_t ShardBits = 0, typename HashFn = std::hash<KeyType>, typename KeyEqual = std::equal_to<KeyType>, typename Allocator = std::allocator<uint8_t>, template< typename > class Atom = std::atomic, class Mutex = std::mutex>
folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::Iterator ( const Iterator o)
delete
template<typename KeyType , typename ValueType , uint8_t ShardBits = 0, typename HashFn = std::hash<KeyType>, typename KeyEqual = std::equal_to<KeyType>, typename Allocator = std::allocator<uint8_t>, template< typename > class Atom = std::atomic, class Mutex = std::mutex>
folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::Iterator ( Iterator &&  o)
inlinenoexcept

Member Function Documentation

template<typename KeyType , typename ValueType , uint8_t ShardBits = 0, typename HashFn = std::hash<KeyType>, typename KeyEqual = std::equal_to<KeyType>, typename Allocator = std::allocator<uint8_t>, template< typename > class Atom = std::atomic, class Mutex = std::mutex>
void folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::next ( )
inline
template<typename KeyType , typename ValueType , uint8_t ShardBits = 0, typename HashFn = std::hash<KeyType>, typename KeyEqual = std::equal_to<KeyType>, typename Allocator = std::allocator<uint8_t>, template< typename > class Atom = std::atomic, class Mutex = std::mutex>
bool folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::operator!= ( const Iterator o) const
inline

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

753  {
754  return !(*this == o);
755  }
template<typename KeyType , typename ValueType , uint8_t ShardBits = 0, typename HashFn = std::hash<KeyType>, typename KeyEqual = std::equal_to<KeyType>, typename Allocator = std::allocator<uint8_t>, template< typename > class Atom = std::atomic, class Mutex = std::mutex>
const value_type& folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::operator* ( ) const
inline

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

template<typename KeyType , typename ValueType , uint8_t ShardBits = 0, typename HashFn = std::hash<KeyType>, typename KeyEqual = std::equal_to<KeyType>, typename Allocator = std::allocator<uint8_t>, template< typename > class Atom = std::atomic, class Mutex = std::mutex>
const Iterator& folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::operator++ ( )
inline
template<typename KeyType , typename ValueType , uint8_t ShardBits = 0, typename HashFn = std::hash<KeyType>, typename KeyEqual = std::equal_to<KeyType>, typename Allocator = std::allocator<uint8_t>, template< typename > class Atom = std::atomic, class Mutex = std::mutex>
const value_type* folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::operator-> ( ) const
inline

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

template<typename KeyType , typename ValueType , uint8_t ShardBits = 0, typename HashFn = std::hash<KeyType>, typename KeyEqual = std::equal_to<KeyType>, typename Allocator = std::allocator<uint8_t>, template< typename > class Atom = std::atomic, class Mutex = std::mutex>
Iterator& folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::operator= ( const Iterator o)
delete
template<typename KeyType , typename ValueType , uint8_t ShardBits = 0, typename HashFn = std::hash<KeyType>, typename KeyEqual = std::equal_to<KeyType>, typename Allocator = std::allocator<uint8_t>, template< typename > class Atom = std::atomic, class Mutex = std::mutex>
Iterator& folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::operator= ( Iterator &&  o)
inlinenoexcept

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

References folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::bucket_count_, folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::buckets_, folly::exchange(), folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::hazptrs_, folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::idx_, folly::gen::move, and folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::node_.

759  {
760  if (this != &o) {
761  hazptrs_ = std::move(o.hazptrs_);
762  node_ = std::exchange(o.node_, nullptr);
763  buckets_ = std::exchange(o.buckets_, nullptr);
764  bucket_count_ = std::exchange(o.bucket_count_, 0);
765  idx_ = std::exchange(o.idx_, 0);
766  }
767  return *this;
768  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
T exchange(T &obj, U &&new_value)
Definition: Utility.h:120
template<typename KeyType , typename ValueType , uint8_t ShardBits = 0, typename HashFn = std::hash<KeyType>, typename KeyEqual = std::equal_to<KeyType>, typename Allocator = std::allocator<uint8_t>, template< typename > class Atom = std::atomic, class Mutex = std::mutex>
bool folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::operator== ( const Iterator o) const
inline
template<typename KeyType , typename ValueType , uint8_t ShardBits = 0, typename HashFn = std::hash<KeyType>, typename KeyEqual = std::equal_to<KeyType>, typename Allocator = std::allocator<uint8_t>, template< typename > class Atom = std::atomic, class Mutex = std::mutex>
void folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::setNode ( Node node,
Buckets buckets,
size_t  bucket_count,
uint64_t  idx 
)
inline

Member Data Documentation

template<typename KeyType , typename ValueType , uint8_t ShardBits = 0, typename HashFn = std::hash<KeyType>, typename KeyEqual = std::equal_to<KeyType>, typename Allocator = std::allocator<uint8_t>, template< typename > class Atom = std::atomic, class Mutex = std::mutex>
size_t folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::bucket_count_ {0}
private
template<typename KeyType , typename ValueType , uint8_t ShardBits = 0, typename HashFn = std::hash<KeyType>, typename KeyEqual = std::equal_to<KeyType>, typename Allocator = std::allocator<uint8_t>, template< typename > class Atom = std::atomic, class Mutex = std::mutex>
Buckets* folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::buckets_ {nullptr}
private
template<typename KeyType , typename ValueType , uint8_t ShardBits = 0, typename HashFn = std::hash<KeyType>, typename KeyEqual = std::equal_to<KeyType>, typename Allocator = std::allocator<uint8_t>, template< typename > class Atom = std::atomic, class Mutex = std::mutex>
uint64_t folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::idx_ {0}
private
template<typename KeyType , typename ValueType , uint8_t ShardBits = 0, typename HashFn = std::hash<KeyType>, typename KeyEqual = std::equal_to<KeyType>, typename Allocator = std::allocator<uint8_t>, template< typename > class Atom = std::atomic, class Mutex = std::mutex>
Node* folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::node_ {nullptr}
private

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