OmniSciDB  340b00dbf6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
foreign_storage::ForeignStorageMgr Class Reference

#include <ForeignStorageMgr.h>

+ Inheritance diagram for foreign_storage::ForeignStorageMgr:
+ Collaboration diagram for foreign_storage::ForeignStorageMgr:

Public Member Functions

 ForeignStorageMgr ()
 
AbstractBuffercreateBuffer (const ChunkKey &chunk_key, const size_t page_size, const size_t initial_size) override
 
void deleteBuffer (const ChunkKey &chunk_key, const bool purge) override
 
void deleteBuffersWithPrefix (const ChunkKey &chunk_key_prefix, const bool purge) override
 
AbstractBuffergetBuffer (const ChunkKey &chunk_key, const size_t num_bytes) override
 
void fetchBuffer (const ChunkKey &chunk_key, AbstractBuffer *destination_buffer, const size_t num_bytes) override
 
AbstractBufferputBuffer (const ChunkKey &chunk_key, AbstractBuffer *source_buffer, const size_t num_bytes) override
 
void getChunkMetadataVecForKeyPrefix (ChunkMetadataVector &chunk_metadata, const ChunkKey &chunk_key_prefix) override
 
bool isBufferOnDevice (const ChunkKey &chunk_key) override
 
std::string printSlabs () override
 
void clearSlabs () override
 
size_t getMaxSize () override
 
size_t getInUseSize () override
 
size_t getAllocated () override
 
bool isAllocationCapped () override
 
void checkpoint () override
 
void checkpoint (const int db_id, const int tb_id) override
 
AbstractBufferalloc (const size_t num_bytes) override
 
void free (AbstractBuffer *buffer) override
 
MgrType getMgrType () override
 
std::string getStringMgrType () override
 
size_t getNumChunks () override
 
void removeTableRelatedDS (const int db_id, const int table_id) override
 
bool hasDataWrapperForChunk (const ChunkKey &chunk_key)
 
bool isDatawrapperRestored (const ChunkKey &chunk_key)
 
void setDataWrapper (const ChunkKey &table_key, std::shared_ptr< MockForeignDataWrapper > data_wrapper)
 
virtual void refreshTable (const ChunkKey &table_key, const bool evict_cached_entries)
 

Protected Member Functions

bool createDataWrapperIfNotExists (const ChunkKey &chunk_key)
 
std::shared_ptr
< ForeignDataWrapper
getDataWrapper (const ChunkKey &chunk_key)
 
bool fetchBufferIfTempBufferMapEntryExists (const ChunkKey &chunk_key, AbstractBuffer *destination_buffer, const size_t num_bytes)
 
void createAndPopulateDataWrapperIfNotExists (const ChunkKey &chunk_key)
 
std::map< ChunkKey,
AbstractBuffer * > 
allocateTempBuffersForChunks (const std::set< ChunkKey > &chunk_keys)
 
void clearTempChunkBufferMapEntriesForTable (const ChunkKey &table_key)
 

Protected Attributes

std::shared_mutex data_wrapper_mutex_
 
std::map< ChunkKey,
std::shared_ptr
< ForeignDataWrapper > > 
data_wrapper_map_
 
std::map< ChunkKey,
std::unique_ptr
< AbstractBuffer > > 
temp_chunk_buffer_map_
 
std::shared_mutex temp_chunk_buffer_map_mutex_
 

Detailed Description

Definition at line 51 of file ForeignStorageMgr.h.

Constructor & Destructor Documentation

foreign_storage::ForeignStorageMgr::ForeignStorageMgr ( )

Definition at line 25 of file ForeignStorageMgr.cpp.

25 : AbstractBufferMgr(0), data_wrapper_map_({}) {}
std::map< ChunkKey, std::shared_ptr< ForeignDataWrapper > > data_wrapper_map_

Member Function Documentation

AbstractBuffer* foreign_storage::ForeignStorageMgr::alloc ( const size_t  num_bytes)
override
std::map<ChunkKey, AbstractBuffer*> foreign_storage::ForeignStorageMgr::allocateTempBuffersForChunks ( const std::set< ChunkKey > &  chunk_keys)
protected
void foreign_storage::ForeignStorageMgr::checkpoint ( )
override
void foreign_storage::ForeignStorageMgr::checkpoint ( const int  db_id,
const int  tb_id 
)
override
void foreign_storage::ForeignStorageMgr::clearSlabs ( )
override
void foreign_storage::ForeignStorageMgr::clearTempChunkBufferMapEntriesForTable ( const ChunkKey table_key)
protected

Referenced by foreign_storage::CachingForeignStorageMgr::refreshTable().

+ Here is the caller graph for this function:

void foreign_storage::ForeignStorageMgr::createAndPopulateDataWrapperIfNotExists ( const ChunkKey chunk_key)
protected
AbstractBuffer* foreign_storage::ForeignStorageMgr::createBuffer ( const ChunkKey chunk_key,
const size_t  page_size,
const size_t  initial_size 
)
override
bool foreign_storage::ForeignStorageMgr::createDataWrapperIfNotExists ( const ChunkKey chunk_key)
protected

Referenced by foreign_storage::CachingForeignStorageMgr::createOrRecoverDataWrapperIfNotExists().

+ Here is the caller graph for this function:

void foreign_storage::ForeignStorageMgr::deleteBuffer ( const ChunkKey chunk_key,
const bool  purge 
)
override
void foreign_storage::ForeignStorageMgr::deleteBuffersWithPrefix ( const ChunkKey chunk_key_prefix,
const bool  purge 
)
override
void foreign_storage::ForeignStorageMgr::fetchBuffer ( const ChunkKey chunk_key,
AbstractBuffer destination_buffer,
const size_t  num_bytes 
)
override
bool foreign_storage::ForeignStorageMgr::fetchBufferIfTempBufferMapEntryExists ( const ChunkKey chunk_key,
AbstractBuffer destination_buffer,
const size_t  num_bytes 
)
protected
void foreign_storage::ForeignStorageMgr::free ( AbstractBuffer buffer)
override
size_t foreign_storage::ForeignStorageMgr::getAllocated ( )
override
AbstractBuffer* foreign_storage::ForeignStorageMgr::getBuffer ( const ChunkKey chunk_key,
const size_t  num_bytes 
)
override
void foreign_storage::ForeignStorageMgr::getChunkMetadataVecForKeyPrefix ( ChunkMetadataVector chunk_metadata,
const ChunkKey chunk_key_prefix 
)
override

Referenced by foreign_storage::CachingForeignStorageMgr::getChunkMetadataVecForKeyPrefix().

+ Here is the caller graph for this function:

std::shared_ptr<ForeignDataWrapper> foreign_storage::ForeignStorageMgr::getDataWrapper ( const ChunkKey chunk_key)
protected
size_t foreign_storage::ForeignStorageMgr::getInUseSize ( )
override
size_t foreign_storage::ForeignStorageMgr::getMaxSize ( )
override
MgrType foreign_storage::ForeignStorageMgr::getMgrType ( )
override
size_t foreign_storage::ForeignStorageMgr::getNumChunks ( )
override
std::string foreign_storage::ForeignStorageMgr::getStringMgrType ( )
override
bool foreign_storage::ForeignStorageMgr::hasDataWrapperForChunk ( const ChunkKey chunk_key)
bool foreign_storage::ForeignStorageMgr::isAllocationCapped ( )
override
bool foreign_storage::ForeignStorageMgr::isBufferOnDevice ( const ChunkKey chunk_key)
override
bool foreign_storage::ForeignStorageMgr::isDatawrapperRestored ( const ChunkKey chunk_key)
std::string foreign_storage::ForeignStorageMgr::printSlabs ( )
override
AbstractBuffer* foreign_storage::ForeignStorageMgr::putBuffer ( const ChunkKey chunk_key,
AbstractBuffer source_buffer,
const size_t  num_bytes 
)
override
virtual void foreign_storage::ForeignStorageMgr::refreshTable ( const ChunkKey table_key,
const bool  evict_cached_entries 
)
virtual
void foreign_storage::ForeignStorageMgr::removeTableRelatedDS ( const int  db_id,
const int  table_id 
)
override
void foreign_storage::ForeignStorageMgr::setDataWrapper ( const ChunkKey table_key,
std::shared_ptr< MockForeignDataWrapper data_wrapper 
)

Member Data Documentation

std::map<ChunkKey, std::shared_ptr<ForeignDataWrapper> > foreign_storage::ForeignStorageMgr::data_wrapper_map_
protected

Definition at line 110 of file ForeignStorageMgr.h.

std::shared_mutex foreign_storage::ForeignStorageMgr::data_wrapper_mutex_
protected

Definition at line 109 of file ForeignStorageMgr.h.

std::map<ChunkKey, std::unique_ptr<AbstractBuffer> > foreign_storage::ForeignStorageMgr::temp_chunk_buffer_map_
protected

Definition at line 114 of file ForeignStorageMgr.h.

std::shared_mutex foreign_storage::ForeignStorageMgr::temp_chunk_buffer_map_mutex_
protected

Definition at line 115 of file ForeignStorageMgr.h.


The documentation for this class was generated from the following files: