[#BloombergLP-bdlcc-Cache_QueueProctor]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::Cache&lowbar;QueueProctor
:relfileprefix: ../../
:mrdocs:

Proctor that restores a cache queue on destruction&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class KEY&gt;
class Cache&lowbar;QueueProctor;
----

== Description

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

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/Cache_QueueProctor/2constructor.adoc[`Cache&lowbar;QueueProctor`]         [.small]#[constructor]#
| Create a `Cache&lowbar;QueueProctor` object to monitor the specified `queue`&period;
| xref:BloombergLP/bdlcc/Cache_QueueProctor/2destructor.adoc[`&#126;Cache&lowbar;QueueProctor`] [.small]#[destructor]#
| Destroy this proctor object&period; Remove any elements that we added since the proctor was created&period;
| xref:BloombergLP/bdlcc/Cache_QueueProctor/release.adoc[`release`] 
| Release the queue specified on construction, so that it will not be modified on the destruction of this proctor&period;
|===



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