#include <ball_recordbuffer.h>
Provide a protocol (or pure interface) for managing record handles (specifically instances of bsl::shared_ptr<Record>).
See ball_recordbuffer
◆ ~RecordBuffer()
| virtual ball::RecordBuffer::~RecordBuffer |
( |
| ) |
|
|
virtual |
Remove all record handles stored in this record buffer and destroy this record buffer.
◆ back()
Return a reference of the shared pointer referring to the record positioned at the back of this record buffer. The behavior is undefined unless this record buffer has been locked by the beginSequence method and 0 < length().
Implemented in ball::FixedSizeRecordBuffer.
◆ beginSequence()
| virtual void ball::RecordBuffer::beginSequence |
( |
| ) |
|
|
pure virtual |
Lock this record buffer so that a sequence of method invocations on this record buffer can occur uninterrupted by other threads. The buffer will remain locked until endSequence is called.
Implemented in ball::FixedSizeRecordBuffer.
◆ endSequence()
| virtual void ball::RecordBuffer::endSequence |
( |
| ) |
|
|
pure 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.
Implemented in ball::FixedSizeRecordBuffer.
◆ front()
Return a reference of the shared pointer referring to the record positioned at the front of this record buffer. The behavior is undefined unless this record buffer has been locked by the beginSequence method and 0 < length().
Implemented in ball::FixedSizeRecordBuffer.
◆ length()
| virtual int ball::RecordBuffer::length |
( |
| ) |
const |
|
pure virtual |
◆ popBack()
| virtual void ball::RecordBuffer::popBack |
( |
| ) |
|
|
pure virtual |
Remove from this record buffer the record handle positioned at the back of the buffer. The behavior is undefined unless 0 < length().
Implemented in ball::FixedSizeRecordBuffer.
◆ popFront()
| virtual void ball::RecordBuffer::popFront |
( |
| ) |
|
|
pure virtual |
Remove from this record buffer the record handle positioned at the front of the buffer. The behavior is undefined unless 0 < length().
Implemented in ball::FixedSizeRecordBuffer.
◆ pushBack()
Append the specified handle to the back of this record buffer. Return 0 on success, and a non-zero value otherwise. Note that concrete implementations are permitted to remove records from the buffer in order to attempt to accommodate a pushBack request (which implies that, after a successful call to pushBack, length is not guaranteed to be more than one, and an unsuccessful call to pushBack is permitted to leave the buffer empty).
Implemented in ball::FixedSizeRecordBuffer.
◆ pushFront()
Insert the specified handle at the front of this record buffer. Return 0 on success, and a non-zero value otherwise. Note that concrete implementations are permitted to remove records from the buffer in order to attempt to accommodate a pushFront request (which implies that, after a successful call to pushFront, length is not guaranteed to be more than one, and an unsuccessful call to pushFront is permitted to leave the buffer empty).
Implemented in ball::FixedSizeRecordBuffer.
◆ removeAll()
| virtual void ball::RecordBuffer::removeAll |
( |
| ) |
|
|
pure virtual |
The documentation for this class was generated from the following file: