#include <CIndexer.h>
Public Types | |
|
typedef std::map< std::string, IndexPolicy * > | IndexerMap |
|
typedef std::map< std::string, IndexPolicy * >::iterator | IndexerIter |
|
typedef std::map< std::string, IndexPolicy * > ::const_iterator | ConstIndexerIter |
Public Member Functions | |
| CIndexer (UINT32 numFiles, UINT32 reservedMem=THIRTYTWO_MB) | |
| ~CIndexer () | |
| IndexPolicy * | getIndexer (std::string const &filename) |
| std::string | getOffsetFromTime (UINT64 ts, UINT64 *offset) const |
| std::string | getOffsetFromTime (struct timespec ts, UINT64 *offset) const |
| void | closeIndexFiles () |
| UINT32 | numFiles () const |
| void | numFiles (UINT32 nFiles) |
| void | timeZone (INT32 gmt_offset) |
| INT32 | timeZone () const |
This class provides functionality for writing and reading index files. Index files are used for fast searches over stream data that has been written to disk.
| x3c::indexer::CIndexer< IndexPolicy >::CIndexer | ( | UINT32 | numFiles, |
| UINT32 | reservedMem = THIRTYTWO_MB |
||
| ) | [explicit] |
Constructor
| x3c::indexer::CIndexer< IndexPolicy >::~CIndexer | ( | ) |
Destructor. Closes index files and free's the indexers
| void x3c::indexer::CIndexer< IndexPolicy >::closeIndexFiles | ( | ) |
Closes the index files. Note does not free the indexers.
| IndexPolicy * x3c::indexer::CIndexer< IndexPolicy >::getIndexer | ( | std::string const & | filename | ) |
Gets an indexer for an index file. Ownership of the retured index is not transfered to the caller.
| filename | the full path to the index file to be opened for reading. |
| std::string x3c::indexer::CIndexer< IndexPolicy >::getOffsetFromTime | ( | UINT64 | ts, |
| UINT64 * | offset | ||
| ) | const |
returns the filename and offset for the first index record that is greater than the timestamp
| ts | the timestamp to search for |
| offset | the address of the buffer to store the file offset into |
| std::string x3c::indexer::CIndexer< IndexPolicy >::getOffsetFromTime | ( | struct timespec | ts, |
| UINT64 * | offset | ||
| ) | const |
returns the filename and offset for the first index record that is greater than the timestamp
| ts | the struct timespec timestamp to search for |
| offset | the address of the buffer to store the file offset into |
| UINT32 x3c::indexer::CIndexer< IndexPolicy >::numFiles | ( | ) | const [inline] |
Returns the number of files the Indexer is managing.
| void x3c::indexer::CIndexer< IndexPolicy >::numFiles | ( | UINT32 | nFiles | ) | [inline] |
Sets the number of files the Indexer is managing.
| void x3c::indexer::CIndexer< IndexPolicy >::timeZone | ( | INT32 | gmt_offset | ) | [inline] |
Set the offset from GMT.
| gmt_offset | The offset in seconds (+/-) from GMT |
TODO: sanity check gmt_offset?
| INT32 x3c::indexer::CIndexer< IndexPolicy >::timeZone | ( | ) | const [inline] |
Return the offset from GMT for this indexer
1.7.6.1