#include <SequenceFile.h>
|
| SequenceFile (NodeID nodeId, DatabaseID dbId, UserTypeID typeId, SetID setId, string path, pdb::PDBLoggerPtr logger, size_t pageSize) |
|
| ~SequenceFile () |
|
bool | openAll () override |
|
bool | closeAll () override |
|
void | clear () override |
|
int | appendPage (FilePartitionID partitionId, PDBPagePtr page) override |
|
int | appendPage (PDBPagePtr page) |
|
int | writeMeta () override |
|
int | updateMeta () override |
|
size_t | loadPage (PageID pageId, char *pageInCache, size_t length) |
|
size_t | loadPage (FilePartitionID partitionId, unsigned int pageSeqInPartition, char *pageInCache, size_t length) override |
|
unsigned int | getAndSetNumFlushedPages () override |
|
unsigned int | getNumFlushedPages () override |
|
PageID | getLastFlushedPageID () override |
|
PageID | getLatestPageID () override |
|
size_t | getPageSize () override |
|
size_t | getPageSizeInMeta () override |
|
FileType | getFileType () override |
|
DatabaseID | getDbId () override |
|
NodeID | getNodeId () override |
|
SetID | getSetId () override |
|
UserTypeID | getTypeId () override |
|
string | getPath () |
|
virtual | ~PDBFileInterface () |
|
This class wraps a SequenceFile class that implements the PDBFileInterface. If using SequenceFile, each set will be flushed to a single file.
Definition at line 36 of file SequenceFile.h.
SequenceFile::~SequenceFile |
( |
| ) |
|
void SequenceFile::clear |
( |
| ) |
|
|
overridevirtual |
bool SequenceFile::closeAll |
( |
| ) |
|
|
overridevirtual |
unsigned int SequenceFile::getAndSetNumFlushedPages |
( |
| ) |
|
|
overridevirtual |
PageID SequenceFile::getLastFlushedPageID |
( |
| ) |
|
|
overridevirtual |
PageID SequenceFile::getLatestPageID |
( |
| ) |
|
|
overridevirtual |
NodeID SequenceFile::getNodeId |
( |
| ) |
|
|
inlineoverridevirtual |
unsigned int SequenceFile::getNumFlushedPages |
( |
| ) |
|
|
overridevirtual |
size_t SequenceFile::getPageSize |
( |
| ) |
|
|
overridevirtual |
size_t SequenceFile::getPageSizeInMeta |
( |
| ) |
|
|
overridevirtual |
string SequenceFile::getPath |
( |
| ) |
|
|
inline |
SetID SequenceFile::getSetId |
( |
| ) |
|
|
inlineoverridevirtual |
size_t SequenceFile::loadPage |
( |
PageID |
pageId, |
|
|
char * |
pageInCache, |
|
|
size_t |
length |
|
) |
| |
To load data of given length on the specified page to cache. This function will be invoked by PageCache instance, length is the size of shared memory allocated for this load. The PageCache instance should make sure that length == pageSize. Otherwise, if length > pageSize, some space will be wasted, and if length < pageSize, some data on the page may not get loaded.
Definition at line 239 of file SequenceFile.cc.
size_t SequenceFile::loadPage |
( |
FilePartitionID |
partitionId, |
|
|
unsigned int |
pageSeqInPartition, |
|
|
char * |
pageInCache, |
|
|
size_t |
length |
|
) |
| |
|
overridevirtual |
To load a page from the file partition to cache memory. Because this is the SequenceFile type, the parameter partitionId can be ignored, and pageSeqInPartition in a SequenceFile instance is always equivalent to PageID;
Implements PDBFileInterface.
Definition at line 244 of file SequenceFile.cc.
bool SequenceFile::openAll |
( |
| ) |
|
|
overridevirtual |
int SequenceFile::seekEnd |
( |
| ) |
|
|
protected |
int SequenceFile::seekLastFlushedPageID |
( |
| ) |
|
|
protected |
Seek to the last flushed pageId field in meta data.
Definition at line 187 of file SequenceFile.cc.
int SequenceFile::seekPage |
( |
PageID |
pageId | ) |
|
|
protected |
Seek to the beginning of a page specified in the file.
Definition at line 230 of file SequenceFile.cc.
int SequenceFile::seekPageSizeInMeta |
( |
| ) |
|
|
protected |
int SequenceFile::updateMeta |
( |
| ) |
|
|
overridevirtual |
int SequenceFile::writeData |
( |
void * |
data, |
|
|
size_t |
length |
|
) |
| |
|
protected |
Write data specified to the current file position.
Definition at line 119 of file SequenceFile.cc.
int SequenceFile::writeMeta |
( |
| ) |
|
|
overridevirtual |
string SequenceFile::filePath |
|
private |
PageID SequenceFile::lastFlushedId |
|
private |
size_t SequenceFile::metaSize |
|
private |
unsigned int SequenceFile::numFlushedPages |
|
private |
size_t SequenceFile::pageSize = 0 |
|
private |
SetID SequenceFile::setId |
|
private |
The documentation for this class was generated from the following files: