34 #include <unordered_map>
93 if (lPage->getAccessSequenceId() < rPage->getAccessSequenceId()) {
107 if (lPage->getAccessSequenceId() > rPage->getAccessSequenceId()) {
170 unsigned int pageSeqInPartition,
204 int evictAllDirtyPages();
207 int unpinAndEvictAllDirtyPages();
216 bool evictPage(
CacheKey key,
bool tryFlushOrNot =
true);
219 void getAndSetWarnSize(
unsigned int numSets,
double warnThreshold);
222 void getAndSetEvictStopSize(
unsigned int numSets,
double evictThreshold);
234 unsigned int pageSeqInPartition,
245 void evictionUnlock();
254 bool flushPageWithoutEviction(
CacheKey key);
258 char* allocateBufferFromSharedMemoryBlocking(
size_t size,
int& alignOffset);
262 char* tryAllocateBufferFromSharedMemory(
size_t size,
int& alignOffset);
264 PDBPagePtr buildAndCachePageFromFileHandle(
int handle,
277 unsigned int pageSeqInPartition,
304 unordered_map<CacheKey, PDBPagePtr, CacheKeyHash, CacheKeyEqual>*
cache;
PageCircularBufferPtr flushBuffer
shared_ptr< PDBPage > PDBPagePtr
bool operator()(PDBPagePtr &lPage, PDBPagePtr &rPage)
shared_ptr< PageCache > PageCachePtr
bool operator()(PDBPagePtr &lPage, PDBPagePtr &rPage)
shared_ptr< PDBWork > PDBWorkPtr
LocalitySetReplacementPolicy
shared_ptr< PartitionedFile > PartitionedFilePtr
shared_ptr< SharedMem > SharedMemPtr
unordered_map< CacheKey, PDBPagePtr, CacheKeyHash, CacheKeyEqual > * cache
pdb::PDBWorkerQueuePtr workers
pthread_mutex_t cacheMutex
pdb::PDBLoggerPtr getLogger()
pthread_mutex_t countLock
bool operator()(const CacheKey &lKey, const CacheKey &rKey) const
shared_ptr< PDBWorkerQueue > PDBWorkerQueuePtr
shared_ptr< PDBFileInterface > PDBFilePtr
shared_ptr< Configuration > ConfigurationPtr
pdb::PDBWorkPtr evictWork
vector< list< LocalitySetPtr > * > * priorityList
shared_ptr< LocalitySet > LocalitySetPtr
std::shared_ptr< PDBLogger > PDBLoggerPtr
std::size_t operator()(const CacheKey &key) const
#define DEFAULT_PAGE_SIZE
pthread_rwlock_t evictionAndFlushLock
shared_ptr< PageCircularBuffer > PageCircularBufferPtr
pthread_mutex_t evictionMutex
unsigned int FilePartitionID
shared_ptr< SequenceFile > SequenceFilePtr