#include <PageFileManager.h>
Public Member Functions | |
ReturnCode | createFile (const char *fileName) |
Creates a new page file. | |
ReturnCode | removeFile (const char *fileName) |
Removes (i.e., deletes) a page file. | |
ReturnCode | openFile (const char *fileName, PageFileHandle **fileHandle) |
Opens a page file. | |
ReturnCode | closeFile (PageFileHandle *fileHandle) |
Closes the file and deletes its file handle. | |
Static Public Member Functions | |
static PageFileManager * | getInstance () |
Gets the singleton instance of this class. | |
Friends | |
class | HandleCache< PageFileManager, PageFileHandle > |
PageFileManager is a low-level component of DavisDB that manages the creation and destruction of paged files. Manipulation of the contents of paged files is done through PageFileHandle objects that are opened and closed via the methods of this class. This is a singleton class.
ReturnCode PageFileManager::createFile | ( | const char * | fileName | ) |
Creates a new page file.
fileName | The name of the file to create. |
ReturnCode PageFileManager::removeFile | ( | const char * | fileName | ) |
Removes (i.e., deletes) a page file.
fileName | The file to remove. |
ReturnCode PageFileManager::openFile | ( | const char * | fileName, | |
PageFileHandle ** | fileHandle | |||
) |
Opens a page file.
fileName | The file to open. | |
fileHandle | Out parameter for the file handle. |
ReturnCode PageFileManager::closeFile | ( | PageFileHandle * | fileHandle | ) |
Closes the file and deletes its file handle.
fileHandle | The file handle to be closed. |
PageFileManager * PageFileManager::getInstance | ( | ) | [static] |
Gets the singleton instance of this class.
Gets the static singleton instance of this class.