Represents an SSTable (Sorted String Table) used in the LSM Tree. More...
#include <sstable.hpp>
Public Member Functions | |
| SS_Table (const std::string &filename) | |
| Constructs an SS_Table from a given filename (excluding extensions). | |
| SS_Table (const std::string &index_filename, const std::string &data_filename) | |
| Constructs an SS_Table from existing index and data filenames. | |
| bool | loadIndex () |
| Loads the SSTable index from the index file. | |
| std::pair< bool, std::string > | getValue (std::string key) |
| Retrieves the value associated with a key from the SSTable. | |
| std::string | getIndexFile () const |
| Gets the filename of the SSTable's index file. | |
| std::string | getDataFilename () const |
| Gets the filename of the SSTable's data file. | |
Static Public Member Functions | |
| static bool | createFromMemTable (const std::string &filename, MemTable *memTable) |
| Creates an SSTable from a given MemTable. | |
Represents an SSTable (Sorted String Table) used in the LSM Tree.
This class handles persistent storage of key-value pairs by writing data in a structured format. It provides functions for loading indexes, retrieving values, and managing SSTable files.
|
inline |
Constructs an SS_Table from a given filename (excluding extensions).
| filename | Base name for the SSTable (without extensions). |
|
inline |
Constructs an SS_Table from existing index and data filenames.
| index_filename | Path to the index file. |
| data_filename | Path to the data file. |
|
inlinestatic |
|
inline |
Gets the filename of the SSTable's data file.
|
inline |
Gets the filename of the SSTable's index file.
|
inline |
Retrieves the value associated with a key from the SSTable.
| key | The key to look up. |
|
inline |
Loads the SSTable index from the index file.