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.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
PageCircularBufferIterator Class Reference

#include <PageCircularBufferIterator.h>

+ Inheritance diagram for PageCircularBufferIterator:
+ Collaboration diagram for PageCircularBufferIterator:

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
 

Detailed Description

This provides a wrapper of iterator to the page circular buffer.

Definition at line 39 of file PageCircularBufferIterator.h.

Constructor & Destructor Documentation

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.

Member Function Documentation

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.

bool PageCircularBufferIterator::hasNext ( )
overridevirtual

Return true only if the buffer is empty and closed.

Implements PageIteratorInterface.

Definition at line 52 of file PageCircularBufferIterator.cc.

PDBPagePtr PageCircularBufferIterator::next ( )
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.

Member Data Documentation

PageCircularBufferPtr PageCircularBufferIterator::buffer
private

Definition at line 67 of file PageCircularBufferIterator.h.

unsigned int PageCircularBufferIterator::id
private

Definition at line 69 of file PageCircularBufferIterator.h.

pdb::PDBLoggerPtr PageCircularBufferIterator::logger
private

Definition at line 68 of file PageCircularBufferIterator.h.


The documentation for this class was generated from the following files: