A platform for high-performance distributed tool and library development written in C++. It can be deployed in two different cluster modes: standalone or distributed. API for v0.5.0, released on June 13, 2018.
|
#include <PageCircularBufferIterator.h>
Public Member Functions | |
PageCircularBufferIterator (unsigned int id, PageCircularBufferPtr buffer, pdb::PDBLoggerPtr logger) | |
~PageCircularBufferIterator () | |
bool | hasNext () override |
PDBPagePtr | next () override |
unsigned int | getId () |
Public Member Functions inherited from PageIteratorInterface | |
virtual | ~PageIteratorInterface () |
Private Attributes | |
PageCircularBufferPtr | buffer |
pdb::PDBLoggerPtr | logger |
unsigned int | id |
This provides a wrapper of iterator to the page circular buffer.
Definition at line 39 of file PageCircularBufferIterator.h.
PageCircularBufferIterator::PageCircularBufferIterator | ( | unsigned int | id, |
PageCircularBufferPtr | buffer, | ||
pdb::PDBLoggerPtr | logger | ||
) |
Definition at line 27 of file PageCircularBufferIterator.cc.
PageCircularBufferIterator::~PageCircularBufferIterator | ( | ) |
Definition at line 35 of file PageCircularBufferIterator.cc.
unsigned int PageCircularBufferIterator::getId | ( | ) |
Return the ID of this iterator. The ID can be used to specify the scanning thread owning the iterator.
Definition at line 58 of file PageCircularBufferIterator.cc.
|
overridevirtual |
Return true only if the buffer is empty and closed.
Implements PageIteratorInterface.
Definition at line 52 of file PageCircularBufferIterator.cc.
|
overridevirtual |
Return the page at the head of the buffer. It will block if the buffer is empty but not closed. It will return the page from head of the buffer, if the buffer is not empty. It will return nullptr, if the buffer is empty and is closed.
Implements PageIteratorInterface.
Definition at line 38 of file PageCircularBufferIterator.cc.
|
private |
Definition at line 67 of file PageCircularBufferIterator.h.
|
private |
Definition at line 69 of file PageCircularBufferIterator.h.
|
private |
Definition at line 68 of file PageCircularBufferIterator.h.