libspatialindex API Reference  (git-trunk)
SpatialIndex::StorageManager::Buffer Class Referenceabstract

#include <Buffer.h>

Inheritance diagram for SpatialIndex::StorageManager::Buffer:
Inheritance graph
Collaboration diagram for SpatialIndex::StorageManager::Buffer:
Collaboration graph

Classes

class  Entry
 

Public Member Functions

 Buffer (IStorageManager &sm, Tools::PropertySet &ps)
 
 ~Buffer () override
 
void flush () override
 
void loadByteArray (const id_type page, uint32_t &len, uint8_t **data) override
 
void storeByteArray (id_type &page, const uint32_t len, const uint8_t *const data) override
 
void deleteByteArray (const id_type page) override
 
void clear () override
 
uint64_t getHits () override
 
- Public Member Functions inherited from SpatialIndex::StorageManager::IBuffer
 ~IBuffer () override=default
 
- Public Member Functions inherited from SpatialIndex::IStorageManager
virtual ~IStorageManager ()=default
 

Protected Member Functions

virtual void addEntry (id_type page, Entry *pEntry)=0
 
virtual void removeEntry ()=0
 

Protected Attributes

uint32_t m_capacity
 
bool m_bWriteThrough
 
IStorageManagerm_pStorageManager
 
std::map< id_type, Entry * > m_buffer
 
uint64_t m_u64Hits
 

Detailed Description

Definition at line 39 of file Buffer.h.

Constructor & Destructor Documentation

◆ Buffer()

◆ ~Buffer()

Buffer::~Buffer ( )
override

Definition at line 54 of file Buffer.cc.

References flush().

Here is the call graph for this function:

Member Function Documentation

◆ addEntry()

virtual void SpatialIndex::StorageManager::Buffer::addEntry ( id_type  page,
Entry pEntry 
)
protectedpure virtual

Implemented in SpatialIndex::StorageManager::RandomEvictionsBuffer.

Referenced by loadByteArray(), and storeByteArray().

Here is the caller graph for this function:

◆ clear()

void Buffer::clear ( )
overridevirtual

Implements SpatialIndex::StorageManager::IBuffer.

Definition at line 134 of file Buffer.cc.

References m_buffer, m_pStorageManager, m_u64Hits, and SpatialIndex::IStorageManager::storeByteArray().

Here is the call graph for this function:

◆ deleteByteArray()

void Buffer::deleteByteArray ( const id_type  page)
overridevirtual

Implements SpatialIndex::IStorageManager.

Definition at line 122 of file Buffer.cc.

References SpatialIndex::IStorageManager::deleteByteArray(), m_buffer, and m_pStorageManager.

Here is the call graph for this function:

◆ flush()

void Buffer::flush ( )
overridevirtual

Implements SpatialIndex::IStorageManager.

Definition at line 59 of file Buffer.cc.

References m_buffer, m_pStorageManager, and SpatialIndex::IStorageManager::storeByteArray().

Referenced by ~Buffer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHits()

uint64_t Buffer::getHits ( )
overridevirtual

Implements SpatialIndex::StorageManager::IBuffer.

Definition at line 151 of file Buffer.cc.

References m_u64Hits.

◆ loadByteArray()

void Buffer::loadByteArray ( const id_type  page,
uint32_t &  len,
uint8_t **  data 
)
overridevirtual

Implements SpatialIndex::IStorageManager.

Definition at line 72 of file Buffer.cc.

References addEntry(), SpatialIndex::IStorageManager::loadByteArray(), m_buffer, m_pStorageManager, and m_u64Hits.

Here is the call graph for this function:

◆ removeEntry()

virtual void SpatialIndex::StorageManager::Buffer::removeEntry ( )
protectedpure virtual

◆ storeByteArray()

void Buffer::storeByteArray ( id_type page,
const uint32_t  len,
const uint8_t *const  data 
)
overridevirtual

Member Data Documentation

◆ m_buffer

◆ m_bWriteThrough

bool SpatialIndex::StorageManager::Buffer::m_bWriteThrough
protected

Definition at line 79 of file Buffer.h.

Referenced by Buffer(), and storeByteArray().

◆ m_capacity

uint32_t SpatialIndex::StorageManager::Buffer::m_capacity
protected

◆ m_pStorageManager

IStorageManager* SpatialIndex::StorageManager::Buffer::m_pStorageManager
protected

◆ m_u64Hits

uint64_t SpatialIndex::StorageManager::Buffer::m_u64Hits
protected

Definition at line 82 of file Buffer.h.

Referenced by clear(), getHits(), loadByteArray(), and storeByteArray().


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