[#BloombergLP-bdlcc-FixedQueueIndexManager]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::FixedQueueIndexManager
:relfileprefix: ../../
:mrdocs:

Thread&hyphen;enabled index manager for a fixed&hyphen;size circular buffer&period;

== Synopsis

Declared in `&lt;bdlcc&lowbar;fixedqueueindexmanager&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class FixedQueueIndexManager;
----

== Description

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

== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/FixedQueueIndexManager/_04enum.adoc[`Unnamed enum`] 
| Capacity&hyphen;related constants for this index manager&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/FixedQueueIndexManager/2constructor.adoc[`FixedQueueIndexManager`]         [.small]#[constructor]#
| Create an index manager for a circular buffer having the specified maximum `capacity`&period;
| xref:BloombergLP/bdlcc/FixedQueueIndexManager/2destructor.adoc[`&#126;FixedQueueIndexManager`] [.small]#[destructor]#
| Destroy this object&period;
| xref:BloombergLP/bdlcc/FixedQueueIndexManager/abortPushIndexReservation.adoc[`abortPushIndexReservation`] 
| Release the specified `index` for use in the next generation&period;
| xref:BloombergLP/bdlcc/FixedQueueIndexManager/capacity.adoc[`capacity`] 
| Return the maximum number of items that may be stored in the queue&period;
| xref:BloombergLP/bdlcc/FixedQueueIndexManager/commitPopIndex.adoc[`commitPopIndex`] 
| Mark the specified `index` as available (empty) in the next generation&period;
| xref:BloombergLP/bdlcc/FixedQueueIndexManager/commitPushIndex.adoc[`commitPushIndex`] 
| Mark the specified `index` as occupied (full) in the specified `generation`&period;
| xref:BloombergLP/bdlcc/FixedQueueIndexManager/disable.adoc[`disable`] 
| Mark the queue as disabled&period; Future calls to `reservePushIndex` will fail&period;
| xref:BloombergLP/bdlcc/FixedQueueIndexManager/enable.adoc[`enable`] 
| Mark the queue as enabled&period;
| xref:BloombergLP/bdlcc/FixedQueueIndexManager/isEnabled.adoc[`isEnabled`] 
| Return `true` if the queue is enabled, and `false` if it is disabled&period;
| xref:BloombergLP/bdlcc/FixedQueueIndexManager/length.adoc[`length`] 
| Return a snapshot of the number of items in the queue&period;
| xref:BloombergLP/bdlcc/FixedQueueIndexManager/print.adoc[`print`] 
| Print a formatted string describing the current state of this object to the specified `stream`&period;
| xref:BloombergLP/bdlcc/FixedQueueIndexManager/reservePopIndex.adoc[`reservePopIndex`] 
| Reserve the next available index from which to dequeue an element&period;
| xref:BloombergLP/bdlcc/FixedQueueIndexManager/reservePopIndexForClear.adoc[`reservePopIndexForClear`] 
| Reserve a pop index for clearing cells up to a push reservation&period;
| xref:BloombergLP/bdlcc/FixedQueueIndexManager/reservePushIndex.adoc[`reservePushIndex`] 
| Reserve the next available index at which to enqueue an element&period;
| xref:BloombergLP/bdlcc/FixedQueueIndexManager/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;FixedQueueIndexManager, UsesBslmaAllocator&gt;`] 
| Declare that this type uses a `bslma` allocator&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/FixedQueueIndexManager/circularDifference.adoc[`circularDifference`] 
| Return the signed circular difference of two values modulo a bound&period;
| xref:BloombergLP/bdlcc/FixedQueueIndexManager/numRepresentableGenerations.adoc[`numRepresentableGenerations`] 
| Return the number of representable generations for a circular buffer of the specified `capacity`&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
