|
| UserSet (pdb::PDBLoggerPtr logger, SharedMemPtr shm, NodeID nodeId, DatabaseID dbId, UserTypeID typeId, SetID setId, string setName, PageCachePtr pageCache, LocalityType localityType=JobData, LocalitySetReplacementPolicy policy=MRU, OperationType operation=Read, DurabilityType durability=TryCache, PersistenceType persistence=Persistent, size_t pageSize=DEFAULT_PAGE_SIZE) |
|
| UserSet (size_t pageSize, pdb::PDBLoggerPtr logger, SharedMemPtr shm, NodeID nodeId, DatabaseID dbId, UserTypeID typeId, SetID setId, string setName, PartitionedFilePtr file, PageCachePtr pageCache, LocalityType localityType=JobData, LocalitySetReplacementPolicy policy=MRU, OperationType operation=Read, DurabilityType durability=TryCache, PersistenceType persistence=Persistent) |
|
| ~UserSet () |
|
bool | addObject (PDBObjectPtr object, PDBPagePtr page) |
|
bool | addObject (PDBObjectPtr object) |
|
void | pinBufferPage () |
|
void | unpinBufferPage () |
|
PDBPagePtr | getPageFromFile (FilePartitionID partitionId, unsigned int pageSeqInPartition) |
|
PDBPagePtr | addPage () |
|
PDBPagePtr | addPageByRawBytes (size_t sharedMemOffset) |
|
void * | getNewBytes (size_t size, bool evictWhenUnpin=false) |
|
virtual vector< PageIteratorPtr > * | getIterators () |
|
PDBPagePtr | getPage (FilePartitionID partitionId, unsigned int pageSeqInPartition, PageID pageId) |
|
int | getNumPages () |
|
DatabaseID | getDbID () |
|
UserTypeID | getTypeID () |
|
SetID | getSetID () |
|
string | getSetName () |
|
PartitionedFilePtr | getFile () |
|
void | setFile (PartitionedFilePtr file) |
|
PageID | getLastFlushedPageId () |
|
void | setLastFlushedPageId (PageID pageId) |
|
void | addPageToDirtyPageSet (PageID pageId) |
|
void | removePageFromDirtyPageSet (PageID pageId, FilePartitionID partitionId, unsigned int pageSeqInPartition) |
|
unordered_map< PageID,
FileSearchKey > * | getDirtyPageSet () |
|
void | lockDirtyPageSet () |
|
void | unlockDirtyPageSet () |
|
void | dump (char *buffer) |
|
void | evictPages () |
|
bool | getPinned () |
|
void | setPinned (bool isPinned) |
|
pdb::PDBLoggerPtr | getLogger () |
|
void | cleanDirtyPageSet () |
|
void | flushDirtyPages () |
|
size_t | getPageSize () |
|
void | setPageSize (size_t pageSize) |
|
bool | getSorted () |
|
void | setSorted (bool isSorted) |
|
bool | getPartitioned () |
|
void | setPartitioned (bool isPartitioned) |
|
| LocalitySet (LocalityType localityType, LocalitySetReplacementPolicy replacementPolicy, OperationType operationType, DurabilityType durabilityType, PersistenceType persistenceType) |
|
| ~LocalitySet () |
|
void | addCachedPage (PDBPagePtr page) |
|
void | updateCachedPage (PDBPagePtr page) |
|
void | removeCachedPage (PDBPagePtr page) |
|
PDBPagePtr | selectPageForReplacement () |
|
vector< PDBPagePtr > * | selectPagesForReplacement () |
|
void | pin (LocalitySetReplacementPolicy policy, OperationType operationType) |
|
void | unpin () |
|
LocalityType | getLocalityType () |
|
void | setLocalityType (LocalityType type) |
|
LocalitySetReplacementPolicy | getReplacementPolicy () |
|
void | setReplacementPolicy (LocalitySetReplacementPolicy policy) |
|
OperationType | getOperationType () |
|
void | setOperationType (OperationType type) |
|
DurabilityType | getDurabilityType () |
|
void | setDurabilityType (DurabilityType type) |
|
PersistenceType | getPersistenceType () |
|
void | setPersistenceType (PersistenceType type) |
|
bool | isLifetimeEnded () |
|
void | setLifetimeEnd (bool lifetimeEnded) |
|
This class implements UserSet. A UserType instance include one or more UserSet instances. Each UserSet instance represents a locality group of data, so that all data in a UserSet instance are of the same type and will be accessed together.
A UserSet class has following key members:
- A point to the global buffer pool (or called PageCache)
- A PDBFile instance to manage persisted data
Different with BufferSet, a UserSet does not have input buffer to buffer writes. For writing, user can directly pin a new page in buffer pool, so that multi-threaded writing can be more efficient than BufferSet that has single buffer.
Definition at line 55 of file UserSet.h.
Get a set of iterators for scanning the data in the set. The set of iterators will include: – 1 iterator to scan data in input buffer; – K iterators to scan data in file partitions, assuming there are K partitions. IMPORTANT: user needs to delete the returned vector!!!
Get a set of iterators for scanning the data in the set. The set of iterators will include: – 1 iterator to scan data in page cache; – K iterators to scan data in file partitions, assuming there are K partitions.
Definition at line 173 of file UserSet.cc.
Get page from set. Step 1. check whether the page is already in cache using cache key, if so return it. Step 2. check whether the page is flushed to disk file, if so, load it to cache, and return it.
check whether the page is already in cache using cache key, if so return it. otherwise, check whether the page is flushed to disk file, if so, load it to cache, and return it.
Definition at line 126 of file UserSet.cc.