Namespace for concurrent container components.

Types

Name

Description

BoundedQueue

This class provides a thread‐safe bounded queue of values.

BoundedQueue_Node

This class implements the queue's node. A node stores an instance of the specified (template parameter) TYPE, and provides an accessor isUnconstructed that indicates whether the value of the node was correctly constructed. If isUnconstructed is false, then the value (d_value) refers to a valid object. If isUnconstructed is true then d_value does not refer to a valid object, it does not represent a value in this queue, and the destructor of d_value should not be called. The specified (template parameter) type RECLAIMABLE is used to provide a compile time optimization for the footprint of this template when the value of isUnconstructed is known at compile‐time. If RECLAIMABLE is false then it can be determined at compile time that the construction of TYPE will uncoditionally succeed (e.g., it IsBitwiseCopyable), and the isUnconstructed property does not require a data member to be accessed at run‐time.

BoundedQueue_PopCompleteGuard

This class implements a guard that invokes TYPE::popComplete on a NODE upon destruction.

BoundedQueue_PushExceptionCompleteProctor

This class implements a proctor that invokes TYPE::pushExceptionComplete upon destruction unless release has been called.

Cache

This class represents a simple in‐process key‐value store supporting a variety of eviction policies.

CacheEvictionPolicy

Namespace for enumerating cache eviction policies.

Cache_QueueProctor

This class implements a proctor that, on destruction, restores the queue to its state at the time of the proctor's creation. We assume that the only change to the queue is that 0 or more items have been added to the end. If release has been called, the destructor takes no action.

Cache_TestUtil

This class implements a test utility that gives the test driver access to the lock / unlock method of the RW mutex. Its purpose is to allow testing that the locking actually happens as planned.

Deque

This class provides a fully thread‐safe implementation of an efficient, in‐place, indexable, double‐ended queue of (template parameter) TYPE values. Direct access to the underlying bsl::deque<TYPE> object is provided through the nested Proctor and ConstProctor classes. While this class is not value‐semantic, the underlying bsl::deque<TYPE> class is.

FixedQueue

This class provides a thread‐aware, lock‐free, fixed‐size queue of values.

FixedQueueIndexManager

This class implements a circular buffer of atomic state variables. These are intended to synchronize access to another (non‐atomic) indexed data structure so that the other data structure can be used as a thread‐enabled fixed‐size queue.

FixedQueue_PopGuard

This class provides a guard that, upon its destruction, will remove (pop) the indicated element from the FixedQueue object supplied at construction. Note that this guard is used to provide exception safety when popping an element from a FixedQueue object.

FixedQueue_PushProctor

This class provides a proctor that, unless the release method has been previously invoked, will remove and destroy all the elements from a FixedQueue object supplied at construction (putting that ring‐buffer into a valid empty state) upon the proctor's destruction. Note that this guard is used to provide exception safety when pushing an element into a FixedQueue.

MultipriorityQueue

This class implements a thread‐enabled multipriority queue whose priorities are restricted to a (small) set of contiguous N integer values, [ 0 .. N ‐ 1 ], with 0 being the most urgent.

MultipriorityQueue_Node

This class handles storage of one item of parameterized TYPE as a node in a linked list of items stored in a multipriority queue for a given priority. This class is not to be used from outside this component.

ObjectCatalog

This class defines an efficient indexed object catalog of TYPE objects. This container is exception neutral with no guarantee of rollback: if an exception is thrown during the invocation of a method on a pre‐existing instance, the object is left in a valid but undefined state. In no event is memory leaked or a mutex left in a locked state.

ObjectCatalogIter

Provide thread safe iteration through all the objects of an object catalog of parameterized TYPE. The order of the iteration is implementation defined. An iterator is valid if it is associated with an object in the catalog, otherwise it is invalid. Thread‐safe iteration is provided by (read)locking the object catalog during the iterator's construction and unlocking it at the iterator's destruction. This guarantees that during the life time of an iterator, the object catalog can't be modified (nevertheless, multiple threads can concurrently read the object catalog).

ObjectCatalog_AutoCleanup

This class provides a specialized proctor object that, upon destruction and unless the release method is called (1) removes a managed node from the ObjectCatalog, and (2) deallocates all associated memory as necessary.

ObjectPool

This class provides a thread‐safe pool of reusable objects. It also implements the bdlma::Factory protocol: "creating" objects gets them from the pool and "deleting" objects returns them to the pool.

ObjectPoolFunctors

This struct provides several functors that are suitable RESETTER parameter types for ObjectPool. It also provides a typedef that specifies the default CREATOR parameter type for ObjectPool.

ObjectPool_CreatorConverter

The purpose of this private class is to avoid ambiguity between different template instantiations of bsl::function accepted by the constructors of ObjectPool. It should not be used directly.

ObjectPool_DefaultProxy

This private class template provides a default constructor that creates a proxied bsl::function object that invokes the default constructor of the parameterized TYPE with placement new.

ObjectPool_GeneralProxy

This private class template provides a default constructor which simply invokes the default constructor of the parameterized TYPE.

ObjectPool_ProxyPicker

For a CREATOR type other than the specialization below, provide a metafunction that returns ObjectPool_GeneralProxy<CREATOR> as the creator proxy for all types.

Queue

This class provides a thread‐enabled implementation of an efficient, in‐place, indexable, double‐ended queue of parameterized TYPE values. Very efficient access to the underlying bdlc::Queue object is provided, as well as to a bslmt::Mutex and a bslmt::Condition variable, to facilitate thread‐safe use of the bdlc::Queue. Note that Queue is not a value‐semantic type, but the underlying bdlc::Queue is. In this regard, Queue is a thread‐enabled handle for a bdlc::Queue.

SharedObjectPool

This class provides a thread‐safe pool of bsl::shared_ptr objects.

SharedObjectPool_Rep

Shared pointer representation object used by SharedObjectPool.

SingleConsumerQueue

This class provides a thread‐safe unbounded queue of values that assumes a single consumer thread.

SingleConsumerQueueImpl

This class provides a thread‐safe unbounded queue of values that assumes a single consumer thread.

SingleConsumerQueueImpl_AllocateLockGuard

This class implements a guard that automatically invokes releaseAllocateLock on the managed queue upon destruction.

SingleConsumerQueueImpl_MarkReclaimProctor

This class implements a proctor that, unless its release method has previously been invoked, automatically invokes markReclaim on a NODE upon destruction.

SingleConsumerQueueImpl_PopCompleteGuard

This class implements a guard that automatically invokes popComplete on the managed queue upon destruction.

SingleProducerQueue

This class provides a thread‐safe unbounded queue of values that assumes a single producer thread.

SingleProducerQueueImpl

This class provides a thread‐safe unbounded queue of values that assumes a single producer thread.

SingleProducerQueueImpl_PopCompleteGuard

This class implements a guard automatically invokes popComplete on a NODE upon destruction.

SingleProducerQueueImpl_ReleaseAllRawProctor

This class implements a proctor that, unless its release method has previously been invoked, automatically invokes releaseAllRaw on a TYPE upon destruction.

SingleProducerSingleConsumerBoundedQueue

This class provides a thread‐safe bounded queue of values that supports a single producer and a single consumer.

SingleProducerSingleConsumerBoundedQueue_PopCompleteGuard

This class implements a guard that invokes TYPE::popComplete on a NODE upon destruction.

SkipList

This class provides a generic thread‐safe Skip List (an ordered associative container). It supports an almost complete set of value semantic operations, including copy construction, assignment, equality comparison, and ostream printing (but not BDEX serialization).

SkipListPair

Pointers to objects of this class are used in the "raw" API of SkipList; however, objects of the class are never constructed as the class serves only to provide type‐safe pointers.

SkipListPairHandle

Objects of this class refer to an association (pair) in a SkipList. A bdlcc::SkipListPairHandle is implicitly convertible to a const Pair* and thus may be used anywhere in the SkipList API that a const Pair* is expected.

SkipList_DoubleLockGuard

RAII guard that locks two mutexes in address order to avoid deadlock.

SkipList_Node

This component‐private structure is a node in the SkipList.

SkipList_NodeCreationHelper

This component‐private structure is a scoped guard that initializes new nodes and releases them in case of exception.

SkipList_PoolManager

Component‐private manager for the lock‐free pool of skip‐list nodes.

SkipList_PoolUtil

This component‐private utility handles the lock‐free pool of list nodes.

SkipList_RandomLevelGenerator

This component‐private class handles randomizing the levelization of list nodes.

StripedUnorderedContainerImpl

This class implements the logic for a striped hash multimap with logic that supports a (unique) map as a special case.

StripedUnorderedContainerImplMaxLoadFactorFlag

This struct is a constructor flag used to select the contructor that takes a maxLoadFactor value.

StripedUnorderedContainerImpl_ArrayOfLocksWriteGuard

This class holds locks on an array of locks, established in sequential order, and unlocks them upon destruction in the RAII pattern.

StripedUnorderedContainerImpl_Bucket

This class represents a bucket of the hash map. This class template represents the head of in the singly‐linked list of (KEY, VALUE) elements in a hash map.

StripedUnorderedContainerImpl_Constants

This class defines constant values used to represent the state of a StripedUnorderedContainerImpl object.

StripedUnorderedContainerImpl_LockElement

A mutex + support info; padded to cacheline size, one per stripe

StripedUnorderedContainerImpl_LockElementReadGuard

A guard pattern on StripedUnorderedContainerImpl_LockElement, to release on exception, for a lock element locked as read.

StripedUnorderedContainerImpl_LockElementWriteGuard

A guard pattern on StripedUnorderedContainerImpl_LockElement, to release on exception, for a lock element locked as write.

StripedUnorderedContainerImpl_Node

This class template represents a node in the singly‐linked list of (KEY, VALUE) elements for each bucket of a hash map.

StripedUnorderedContainerImpl_RehashBitSetGuard

This class defines a proctor type that attempts to set the rehash bit of a state object, and if successful, clears that bit upon destruction.

StripedUnorderedContainerImpl_SortItem

A vector element needed for efficient sorting for the insertBulk and eraseBulk methods.

StripedUnorderedContainerImpl_TestUtil

This class implements a test utility that gives the test driver access to the lock / unlock method of the Read/Write mutex. Its purpose is to allow testing that the locking actually happens as planned.

StripedUnorderedMap

This class template defines a fully thread‐safe container that provides a mapping from keys (of template parameter type KEY) to their associated mapped values (of template parameter type VALUE).

StripedUnorderedMultiMap

This class template defines a fully thread‐safe container that provides a mapping from keys (of template parameter type KEY) to their associated mapped values (of template parameter type VALUE).

TimeQueue

This parameterized class provides a public interface which is similar in structure and intent to Queue<DATA>, with the exception that each item stored in the TimeQueue has an associated time value. Items are retrieved or exchanged by proxy of a TimeQueueItem<DATA>, and are referred to by an opaque data type TimeQueue::Handle which serves to identify an individual element on the Time Queue. Idiomatic usage of TimeQueue includes the member function popLE, which finds all items on the queue whose bsls::TimeInterval are less than a specified value and transfers those items to a provided vector of items, and the member function update, which can update the time value for a specific TimeQueueItem without removing it from the queue.

TimeQueueItem

This parameterized structure holds a time, data and associated handle. This structure is used in the interface of TimeQueue<DATA> to provide thread‐safe access to individual elements on the queue. Note that DATA must be default‐constructible.

Functions

Name

Description

operator<<

Write the specified list to the specified output stream and return a reference to the modifiable stream.

operator==

Equality operators

operator!=

Inequality operators

operator<

Return true if the specified lhs is smaller than the specified rhs in the order of stripe, and data.

Created with MrDocs