cds  1.4.0
Data Structures | Public Types | Public Member Functions | Protected Types | Protected Attributes
cds::intrusive::split_list::expandable_bucket_table< GC, Node, Options > Class Template Reference

Expandable bucket table. More...

#include <cds/intrusive/split_list_base.h>

Data Structures

struct  metrics
 Bucket table metrics. More...
 

Public Types

typedef GC gc
 Garbage collector.
 
typedef Node node_type
 Bucket node type.
 
typedef std::atomic< node_type * > table_entry
 Table entry type.
 
typedef options::memory_model memory_model
 Memory model for atomic operations.
 
typedef
cds::details::Allocator
< segment_type, typename
options::allocator > 
bucket_table_allocator
 Bucket table allocator.
 
typedef
cds::details::Allocator
< table_entry, typename
options::allocator > 
segment_allocator
 Bucket table segment allocator.
 

Public Member Functions

 expandable_bucket_table ()
 Constructs bucket table for 512K buckets. Load factor is 1.
 
 expandable_bucket_table (size_t nItemCount, size_t nLoadFactor)
 Constructs. More...
 
 ~expandable_bucket_table ()
 Destroy bucket table.
 
node_typebucket (size_t nBucket) const
 Returns head node of the bucket nBucket.
 
void bucket (size_t nBucket, node_type *pNode)
 Set head node pNode of bucket nBucket.
 
size_t capacity () const
 Returns the capacity of the bucket table.
 
size_t load_factor () const
 Returns the load factor, i.e. average count of items per bucket.
 

Protected Types

typedef std::atomic
< table_entry * > 
segment_type
 Bucket table segment type.
 

Protected Attributes

const metrics m_metrics
 Dynamic bucket table metrics.
 
segment_typem_Segments
 bucket table - array of segments
 

Detailed Description

template<typename GC, typename Node, typename... Options>
class cds::intrusive::split_list::expandable_bucket_table< GC, Node, Options >

Expandable bucket table.

This bucket table can dynamically grow its capacity when necessary up to maximum bucket count.

Template parameter:

Options are:

Constructor & Destructor Documentation

template<typename GC , typename Node , typename... Options>
cds::intrusive::split_list::expandable_bucket_table< GC, Node, Options >::expandable_bucket_table ( size_t  nItemCount,
size_t  nLoadFactor 
)
inline

Constructs.

Parameters
nItemCountMax expected item count in split-ordered list
nLoadFactorLoad factor

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

cds 1.4.0 Developed by Maxim Khiszinsky aka khizmax 2007 - 2012
Autogenerated Mon May 20 2013 00:38:01 by Doxygen 1.8.3.1