[#BloombergLP-ball-RecordBuffer] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::RecordBuffer :relfileprefix: ../../ :mrdocs: Provide a protocol (or pure interface) for managing record handles (specifically instances of `bsl::shared_ptr<Record>`). == Synopsis Declared in `<ball_recordbuffer.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class RecordBuffer; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/RecordBuffer/2destructor.adoc[`~RecordBuffer`] [.small]#[destructor]# [.small]#[virtual]# | Remove all record handles stored in this record buffer and destroy this record buffer. | xref:BloombergLP/ball/RecordBuffer/back.adoc[`back`] [.small]#[virtual]# | Return a reference of the shared pointer referring to the record positioned at the back of this record buffer. | xref:BloombergLP/ball/RecordBuffer/beginSequence.adoc[`beginSequence`] [.small]#[virtual]# | _Lock_ this record buffer so that a sequence of method invocations on this record buffer can occur uninterrupted by other threads. | xref:BloombergLP/ball/RecordBuffer/endSequence.adoc[`endSequence`] [.small]#[virtual]# | _Unlock_ this record buffer, thus allowing other threads to access it. The behavior is undefined unless the buffer is already _locked_ by `beginSequence` method. | xref:BloombergLP/ball/RecordBuffer/front.adoc[`front`] [.small]#[virtual]# | Return a reference of the shared pointer referring to the record positioned at the front of this record buffer. | xref:BloombergLP/ball/RecordBuffer/length.adoc[`length`] [.small]#[virtual]# | Return the number of record handles in this record buffer. | xref:BloombergLP/ball/RecordBuffer/popBack.adoc[`popBack`] [.small]#[virtual]# | Remove from this record buffer the record handle positioned at the back of the buffer. The behavior is undefined unless `0 < length()`. | xref:BloombergLP/ball/RecordBuffer/popFront.adoc[`popFront`] [.small]#[virtual]# | Remove from this record buffer the record handle positioned at the front of the buffer. The behavior is undefined unless `0 < length()`. | xref:BloombergLP/ball/RecordBuffer/pushBack.adoc[`pushBack`] [.small]#[virtual]# | Append the specified `handle` to the back of this record buffer. | xref:BloombergLP/ball/RecordBuffer/pushFront.adoc[`pushFront`] [.small]#[virtual]# | Insert the specified `handle` at the front of this record buffer. | xref:BloombergLP/ball/RecordBuffer/removeAll.adoc[`removeAll`] [.small]#[virtual]# | Remove all record handles stored in this record buffer. Note that `length()` is now 0. |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/FixedSizeRecordBuffer.adoc[`FixedSizeRecordBuffer`] | Concrete, thread‐safe fixed‐size buffer of record handles. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#