wrench::LogicalFileSystemLRUCaching
-
class LogicalFileSystemLRUCaching : public wrench::LogicalFileSystem
A class that implements a weak file system abstraction.
Public Functions
Decrement the number of running transactions that have to do with a file.
- Parameters:
file – the file
absolute_path – the file path
Increment the number of running transactions that have to do with a file.
- Parameters:
file – the file
absolute_path – the file path
-
virtual void removeAllFilesInDirectory(const std::string &absolute_path) override
Remove all files in a directory.
- Parameters:
absolute_path – the directory’s absolute path
- Throws:
std::invalid_argument –
Remove a file in a directory.
- Parameters:
file – the file to remove
absolute_path – the directory’s absolute path
- Throws:
std::invalid_argument –
Store file in directory.
- Parameters:
file – the file to store
absolute_path – the directory’s absolute path (at the mount point)
- Throws:
std::invalid_argument –
Update a file’s read date.
- Parameters:
file – the file
absolute_path – the path
Public Members
-
unsigned int next_lru_sequence_number = 0
Next LRU sequence number.
-
struct FileOnDiskLRUCaching : public wrench::LogicalFileSystem::FileOnDisk
A helper struct to describe a file instance on disk.
Public Functions
-
inline FileOnDiskLRUCaching(double last_write_date, unsigned int lru_sequence_number, unsigned short num_current_transactions)
Constructor.
- Parameters:
last_write_date – Last write date
lru_sequence_number – LRU sequence number
num_current_transactions – Number of current transactions using this file on disk
-
inline FileOnDiskLRUCaching(double last_write_date, unsigned int lru_sequence_number, unsigned short num_current_transactions)