![]() |
Storage Engine API
|
Used to protect access to all partitions of this partitioned associative structure. More...
#include <partitioned.h>
Used to protect access to all partitions of this partitioned associative structure.
For example, may be used to empty each partition in the structure, or to provide a snapshotted count of the number of entries across all partitions.
Public Member Functions | |
| auto | begin () & |
| Returns an iterator at the start of the partitions. More... | |
| auto | end () & |
| Returns an iterator at the end of the partitions. More... | |
| auto | begin () const & |
| Returns an iterator at the start of the partitions. More... | |
| void | begin () &&=delete |
| auto | end () const & |
| Returns an iterator at the end of the partitions. More... | |
| void | end () &&=delete |
| std::size_t | size () const |
| Returns the number of elements in all partitions, summed together. More... | |
| bool | empty () const |
| Returns true if each partition is empty. More... | |
| std::size_t | count (const key_type &key) const |
| Returns the number of entries with the given key. More... | |
| void | clear () |
| Empties each container within each partition. More... | |
| void | insert (value_type value) & |
Inserts value into its designated partition. More... | |
| void | insert (value_type) &&=delete |
| std::size_t | erase (const key_type &key) & |
| Erases one entry from the partitioned structure, returns the number of entries removed. More... | |
| void | erase (const key_type &) &&=delete |
Private Member Functions | |
| All (Partitioned &partitionedContainer) | |
| Acquires locks for all partitions. More... | |
Private Attributes | |
| std::vector< stdx::unique_lock< stdx::mutex > > | _lockGuards |
| Partitioned * | _partitionedContainer |
Friends | |
| class | Partitioned |
|
inlineexplicitprivate |
Acquires locks for all partitions.
The lifetime of this All object must be shorter than that of partitionedContainer.
|
inline |
Returns an iterator at the start of the partitions.
|
inline |
Returns an iterator at the start of the partitions.
|
delete |
|
inline |
Empties each container within each partition.
|
inline |
Returns the number of entries with the given key.
|
inline |
Returns true if each partition is empty.
|
inline |
Returns an iterator at the end of the partitions.
|
inline |
Returns an iterator at the end of the partitions.
|
delete |
|
inline |
Erases one entry from the partitioned structure, returns the number of entries removed.
|
delete |
|
inline |
Inserts value into its designated partition.
|
delete |
|
inline |
Returns the number of elements in all partitions, summed together.
|
friend |
|
private |
|
private |