28 #include "../Shared/heavyai_shared_mutex.h"
38 using namespace Data_Namespace;
40 namespace foreign_storage {
46 void checkpoint(
const int32_t db_id,
const int32_t tb_id);
49 bool isMetadataCached(
const ChunkKey&)
const;
52 bool hasCachedMetadataForKeyPrefix(
const ChunkKey&)
const;
53 void clearForTablePrefix(
const ChunkKey&);
56 std::vector<ChunkKey> getCachedChunksForKeyPrefix(
const ChunkKey&)
const;
58 ChunkToBufferMap getChunkBuffersForCaching(
const std::set<ChunkKey>& chunk_keys)
const;
64 void deleteBufferIfExists(
const ChunkKey& chunk_key);
67 return caching_file_mgr_->getNumDataChunks();
70 return caching_file_mgr_->getNumChunksWithMetadata();
74 std::string dumpCachedChunkEntries()
const;
75 std::string dumpCachedMetadataEntries()
const;
76 std::string dumpEvictionQueue()
const;
77 std::string
dump()
const {
return caching_file_mgr_->dump(); }
80 return caching_file_mgr_->getFileMgrBasePath();
84 return caching_file_mgr_->getTableFileMgrPath(db_id, tb_id);
88 return getCacheDirectoryForTable(db_id, tb_id) +
"/" +
93 return caching_file_mgr_->getSpaceReservedByTable(db_id, tb_id);
96 void storeDataWrapper(
const std::string& doc, int32_t db_id, int32_t tb_id);
98 bool hasStoredDataWrapperMetadata(int32_t db_id, int32_t table_id)
const;
100 void eraseChunk(
const ChunkKey& chunk_key);
104 caching_file_mgr_->setDataSizeLimit(max);
108 void validatePath(
const std::string&)
const;
std::vector< int > ChunkKey
This file details an extension of the FileMgr that can contain pages from multiple tables (CachingFil...
size_t getMaxChunkDataSize() const
std::map< ChunkKey, AbstractBuffer * > ChunkToBufferMap
Represents/provides access to contiguous data stored in the file system.
void setDataSizeLimit(size_t max) const
uint64_t getSpaceReservedByTable(int db_id, int tb_id) const
An AbstractBuffer is a unit of data management for a data manager.
size_t getNumCachedMetadata() const
std::string getSerializedWrapperPath(int32_t db_id, int32_t tb_id) const
CacheTooSmallException(const std::string &msg)
std::unique_ptr< File_Namespace::CachingFileMgr > caching_file_mgr_
std::string getCacheDirectory() const
std::string getCacheDirectoryForTable(int db_id, int tb_id) const
static constexpr char WRAPPER_FILE_NAME[]
size_t getNumCachedChunks() const