#include <IndexHandle.h>
Public Member Functions | |
PageFileHandle * | getFileHandle () |
Gets the handle for the page file underlying this index. | |
ReturnCode | insertEntry (const TypedValue *data, const RecordID *rid) |
Inserts a new entry into the index. | |
ReturnCode | deleteEntry (const TypedValue *data, const RecordID *rid) |
Deletes an entry from the index. | |
ReturnCode | forcePage (int pageNo) |
Flushes the specified page to disk. | |
ReturnCode | forceAllPages () |
Flushes all dirty pages to disk. |
The IndexHandle class is used to insert and delete index entries, and to force pages of an index's files to disk. Index handles are obtained by calling IndexManager::openIndex, and freed by calling IndexManager::closeIndex.
ReturnCode IndexHandle::insertEntry | ( | const TypedValue * | data, | |
const RecordID * | rid | |||
) |
Inserts a new entry into the index.
data | The key of the new entry | |
rid | The record id of the new entry |
ReturnCode IndexHandle::deleteEntry | ( | const TypedValue * | data, | |
const RecordID * | rid | |||
) |
Deletes an entry from the index.
data | The key of the entry | |
rid | The record id of the entry |
ReturnCode IndexHandle::forcePage | ( | int | pageNo | ) |
Flushes the specified page to disk.
pageNo | The number of the page to flush |
ReturnCode IndexHandle::forceAllPages | ( | ) |
Flushes all dirty pages to disk.
Flushes all dirty pages to disk. Returns RC_OK on success, or other ReturnCode values as specified in FileHandle::forceAllPages otherwise.