#include <Cache.h>
Inheritance diagram for Cache:
Public Member Functions | |
virtual | ~Cache () |
Destructor. | |
virtual void | setAllocatedPageCount (uint nMemPages)=0 |
Resizes this cache. | |
virtual uint | getMaxAllocatedPageCount ()=0 |
| |
virtual uint | getAllocatedPageCount ()=0 |
Gets a count of how many pages currently have allocated buffers. | |
virtual void | collectStats (CacheStats &stats)=0 |
Gets a snapshot of cache activity; as a side-effect, clears cumulative performance counters. | |
uint | getPageSize () const |
| |
virtual CacheAllocator & | getAllocator () const=0 |
virtual void | registerDevice (DeviceId deviceId, SharedRandomAccessDevice pDevice)=0 |
Registers the given device with the Cache; must be called exactly once before any other caching operations can be requested for pages of this device. | |
virtual void | unregisterDevice (DeviceId deviceId)=0 |
Unregisters the given device from the Cache, asserting that no pages remain mapped to the specified device. | |
virtual SharedRandomAccessDevice & | getDevice (DeviceId deviceId)=0 |
Dereferences a device ID to the registered object which represents it. | |
virtual uint | checkpointPages (PagePredicate &pagePredicate, CheckpointType checkpointType=CHECKPOINT_FLUSH_ALL)=0 |
Flushes and/or unmaps selected pages. | |
virtual bool | isPageMapped (BlockId blockId)=0 |
Determines if a particular page is mapped. | |
virtual CachePage & | lockScratchPage (BlockNum blockNum=0)=0 |
Allocates a free page buffer for scratch usage. | |
virtual DeviceAccessScheduler & | getDeviceAccessScheduler (RandomAccessDevice &)=0 |
Gets the correct access scheduler for a given device. | |
virtual SharedCache | getCache () |
| |
virtual uint | getMaxLockedPages () |
| |
virtual void | setMaxLockedPages (uint nPages) |
Sets the page lock quota on this accessor. | |
virtual void | setTxnId (TxnId txnId) |
Sets a default TxnId to use for locking pages (to be used when IMPLICIT_TXN_ID is specified). | |
virtual TxnId | getTxnId () const |
| |
virtual void | writeStats (StatsTarget &target) |
Writes a current stats snapshot to a StatsTarget. | |
bool | isClosed () const |
| |
void | close () |
Closes this object, releasing any unallocated resources. | |
virtual CachePage * | lockPage (BlockId blockId, LockMode lockMode, bool readIfUnmapped=true, MappedPageListener *pMappedPageListener=NULL, TxnId txnId=IMPLICIT_TXN_ID)=0 |
Locks a page into memory with the specified concurrency mode. | |
virtual void | unlockPage (CachePage &page, LockMode lockMode, TxnId txnId=IMPLICIT_TXN_ID)=0 |
Releases lock held on page. | |
virtual void | discardPage (BlockId blockId)=0 |
Unmaps a page from the cache if already mapped, discarding its contents if dirty. | |
virtual bool | prefetchPage (BlockId blockId, MappedPageListener *pMappedPageListener=NULL)=0 |
Hints that a page should be prefetched in preparation for a future lock request. | |
virtual void | prefetchBatch (BlockId blockId, uint nPages, MappedPageListener *pMappedPageListener=NULL)=0 |
Hints that a contiguous run of pages should be prefetched. | |
virtual void | flushPage (CachePage &page, bool async)=0 |
Forces the contents of a dirty page to its mapped location. | |
virtual void | nicePage (CachePage &page)=0 |
Marks a page as nice, indicating that it is very unlikely the page's mapping will be needed again any time soon, so it is a good candidate for victimization. | |
virtual void | getPrefetchParams (uint &prefetchPagesMax, uint &prefetchThrottleRate)=0 |
Retrieves the current pre-fetch caching parameters that determine how many pages should be pre-fetched and how often the pre-fetches should occur. | |
Static Public Member Functions | |
static SharedCache | newCache (CacheParams const &cacheParams, CacheAllocator *bufferAllocator=NULL) |
Factory method. | |
Static Public Attributes | |
static const DeviceId | NULL_DEVICE_ID |
The DeviceId assigned to the instance of RandomAccessNullDevice associated with every cache. | |
Protected Member Functions | |
virtual void | closeImpl ()=0 |
Must be implemented by derived class to release any resources. | |
Protected Attributes | |
uint | cbPage |
bool | needsClose |
Private Member Functions | |
virtual void | notifyTransferCompletion (CachePage &, bool bSuccess)=0 |
virtual void | markPageDirty (CachePage &)=0 |
Friends | |
class | CachePage |
This interface does not dictate how cache buffers are allocated, only how they are accessed. A Cache keeps track of a collection of registered devices; only pages of registered devices may be accessed through the cache.
Note that all concurrency control is performed within the implementations of these methods, so there is never any need to acquire any kind of lock object before calling them. However, some methods are themselves synchronization points, so callers should be aware of the potential for deadlock.
Definition at line 56 of file Cache.h.
Cache::~Cache | ( | ) | [virtual] |
SharedCache Cache::newCache | ( | CacheParams const & | cacheParams, | |
CacheAllocator * | bufferAllocator = NULL | |||
) | [static] |
Factory method.
This creates a cache which uses TwoQVictimPolicy. To create a cache with custom policies, include CacheImpl.h and instantiate CacheImpl directly.
cacheParams | parameters to use to instantiate this cache | |
bufferAllocator | allocator to use for obtaining buffer memory; NULL indicates use a private VMAllocator without mlocking |
Definition at line 51 of file Cache.cpp.
Referenced by DatabaseTest::DatabaseTest(), CacheTestBase::newCache(), SparseBitmapTest::openStorage(), BackupRestoreTest::testBackupCleanup(), BTreeTxnTest::testCaseSetUp(), BackupRestoreTest::testHeaderBackupRestore(), CacheTest::testLargeCacheInit(), CacheTest::testLargeCacheRequest(), and CmdInterpreter::visit().
00054 { 00055 typedef CacheImpl< 00056 TwoQPage, 00057 TwoQVictimPolicy<TwoQPage> 00058 > TwoQCache; 00059 return SharedCache( 00060 new TwoQCache(cacheParams,bufferAllocator), 00061 ClosableObjectDestructor()); 00062 }
virtual void Cache::setAllocatedPageCount | ( | uint | nMemPages | ) | [pure virtual] |
Resizes this cache.
If nMemPages is greater than the number of page buffers currently allocated, allocates more. If less, frees some (victimizing as necessary).
nMemPages | desired buffer allocation count; must be less than the nMemPagesMax specified when the cache was created, and also less than the current clean page target |
Implemented in CacheImpl< PageT, VictimPolicyT >.
Referenced by PagingTestBase::testCacheResize().
virtual uint Cache::getMaxAllocatedPageCount | ( | ) | [pure virtual] |
Implemented in CacheImpl< PageT, VictimPolicyT >.
virtual uint Cache::getAllocatedPageCount | ( | ) | [pure virtual] |
Gets a count of how many pages currently have allocated buffers.
Implemented in CacheImpl< PageT, VictimPolicyT >.
Referenced by getMaxLockedPages().
virtual void Cache::collectStats | ( | CacheStats & | stats | ) | [pure virtual] |
Gets a snapshot of cache activity; as a side-effect, clears cumulative performance counters.
stats | receives the snapshot |
Implemented in CacheImpl< PageT, VictimPolicyT >.
Referenced by writeStats().
uint Cache::getPageSize | ( | ) | const [inline] |
Definition at line 137 of file Cache.h.
Referenced by DoubleBufferExecStream::execute(), CachePage::getBufferSize(), FlatFileExecStreamImpl::open(), ScratchBufferExecStream::open(), DoubleBufferExecStream::open(), CachePage::tryUpgrade(), and CachePage::upgrade().
00138 { 00139 return cbPage; 00140 }
virtual CacheAllocator& Cache::getAllocator | ( | ) | const [pure virtual] |
Implemented in CacheImpl< PageT, VictimPolicyT >.
virtual void Cache::registerDevice | ( | DeviceId | deviceId, | |
SharedRandomAccessDevice | pDevice | |||
) | [pure virtual] |
Registers the given device with the Cache; must be called exactly once before any other caching operations can be requested for pages of this device.
deviceId | the ID of the device to be registered | |
pDevice | the device to be registered |
Implemented in CacheImpl< PageT, VictimPolicyT >.
virtual void Cache::unregisterDevice | ( | DeviceId | deviceId | ) | [pure virtual] |
Unregisters the given device from the Cache, asserting that no pages remain mapped to the specified device.
deviceId | the ID of the device to be unregistered |
Implemented in CacheImpl< PageT, VictimPolicyT >.
virtual SharedRandomAccessDevice& Cache::getDevice | ( | DeviceId | deviceId | ) | [pure virtual] |
Dereferences a device ID to the registered object which represents it.
deviceId | the ID of the device of interest |
Implemented in CacheImpl< PageT, VictimPolicyT >.
virtual uint Cache::checkpointPages | ( | PagePredicate & | pagePredicate, | |
CheckpointType | checkpointType = CHECKPOINT_FLUSH_ALL | |||
) | [pure virtual] |
Flushes and/or unmaps selected pages.
pagePredicate | caller-provided interface for deciding which pages should be checkpointed; the given PagePredicate will be called for each mapped page, and only those which satisfy the predicate will be affected by the checkpoint (note that the page mutex is held for the duration of the call, so implementations must take care to avoid deadlock) | |
checkpointType | type of checkpoint to execute |
Implemented in CacheImpl< PageT, VictimPolicyT >.
Referenced by PagingTestBase::testCheckpoint().
virtual bool Cache::isPageMapped | ( | BlockId | blockId | ) | [pure virtual] |
Determines if a particular page is mapped.
blockId | BlockId of the page to test |
Implemented in CacheImpl< PageT, VictimPolicyT >.
Allocates a free page buffer for scratch usage.
The returned page is considered to be locked in exclusive mode but not mapped to any device. To release the page, use unlock(LOCKMODE_X).
Although the page remains unmapped, its BlockId is set for the duration of the lock. The caller can supply a BlockNum, which need not be unique.
blockNum | the block number to use when making up the Page's BlockId; the device ID will be NULL_DEVICE_ID |
Implemented in CacheImpl< PageT, VictimPolicyT >.
virtual DeviceAccessScheduler& Cache::getDeviceAccessScheduler | ( | RandomAccessDevice & | ) | [pure virtual] |
Gets the correct access scheduler for a given device.
Currently the same scheduler is used for all devices.
Implemented in CacheImpl< PageT, VictimPolicyT >.
SharedCache Cache::getCache | ( | ) | [virtual] |
Implements CacheAccessor.
Definition at line 64 of file Cache.cpp.
Referenced by CachePage::getWritableData(), CachePage::tryUpgrade(), and CachePage::upgrade().
uint Cache::getMaxLockedPages | ( | ) | [virtual] |
Implements CacheAccessor.
Definition at line 69 of file Cache.cpp.
References getAllocatedPageCount().
00070 { 00071 return getAllocatedPageCount(); 00072 }
void Cache::setMaxLockedPages | ( | uint | nPages | ) | [virtual] |
Sets the page lock quota on this accessor.
Ignored for accessor implementations that don't support quotas.
nPages | new quota |
Implements CacheAccessor.
Definition at line 74 of file Cache.cpp.
void Cache::setTxnId | ( | TxnId | txnId | ) | [virtual] |
Sets a default TxnId to use for locking pages (to be used when IMPLICIT_TXN_ID is specified).
Not all CacheAccessor implementations support this behavior.
txnId | new default txn ID |
Implements CacheAccessor.
Definition at line 78 of file Cache.cpp.
TxnId Cache::getTxnId | ( | ) | const [virtual] |
Implements CacheAccessor.
Definition at line 82 of file Cache.cpp.
References IMPLICIT_TXN_ID.
00083 { 00084 return IMPLICIT_TXN_ID; 00085 }
void Cache::writeStats | ( | StatsTarget & | target | ) | [virtual] |
Writes a current stats snapshot to a StatsTarget.
target | receives the stats |
Implements StatsSource.
Definition at line 87 of file Cache.cpp.
References collectStats(), CacheStats::nCheckpointWrites, CacheStats::nCheckpointWritesSinceInit, CacheStats::nDirtyPages, CacheStats::nHits, CacheStats::nHitsSinceInit, CacheStats::nIoRetries, CacheStats::nIoRetriesSinceInit, CacheStats::nLazyWriteCalls, CacheStats::nLazyWriteCallsSinceInit, CacheStats::nLazyWrites, CacheStats::nLazyWritesSinceInit, CacheStats::nMemPagesAllocated, CacheStats::nMemPagesMax, CacheStats::nMemPagesUnused, CacheStats::nPageReads, CacheStats::nPageReadsSinceInit, CacheStats::nPageWrites, CacheStats::nPageWritesSinceInit, CacheStats::nRejectedPrefetches, CacheStats::nRejectedPrefetchesSinceInit, CacheStats::nRequests, CacheStats::nRequestsSinceInit, CacheStats::nSuccessfulPrefetches, CacheStats::nSuccessfulPrefetchesSinceInit, CacheStats::nVictimizations, CacheStats::nVictimizationsSinceInit, CacheStats::nVictimizationWrites, CacheStats::nVictimizationWritesSinceInit, and StatsTarget::writeCounter().
00088 { 00089 CacheStats stats; 00090 collectStats(stats); 00091 target.writeCounter( 00092 "CacheHits", stats.nHits); 00093 target.writeCounter( 00094 "CacheHitsSinceInit", stats.nHitsSinceInit); 00095 target.writeCounter( 00096 "CacheRequests", stats.nRequests); 00097 target.writeCounter( 00098 "CacheRequestsSinceInit", stats.nRequestsSinceInit); 00099 target.writeCounter( 00100 "CacheVictimizations", stats.nVictimizations); 00101 target.writeCounter( 00102 "CacheVictimizationsSinceInit", stats.nVictimizationsSinceInit); 00103 target.writeCounter( 00104 "CacheDirtyPages", stats.nDirtyPages); 00105 target.writeCounter( 00106 "CachePagesRead", stats.nPageReads); 00107 target.writeCounter( 00108 "CachePagesReadSinceInit", stats.nPageReadsSinceInit); 00109 target.writeCounter( 00110 "CachePagesWritten", stats.nPageWrites); 00111 target.writeCounter( 00112 "CachePagesWrittenSinceInit", stats.nPageWritesSinceInit); 00113 target.writeCounter( 00114 "CachePagePrefetchesRejected", stats.nRejectedPrefetches); 00115 target.writeCounter( 00116 "CachePagePrefetchesRejectedSinceInit", 00117 stats.nRejectedPrefetchesSinceInit); 00118 target.writeCounter( 00119 "CachePageIoRetries", stats.nIoRetries); 00120 target.writeCounter( 00121 "CachePageIoRetriesSinceInit", 00122 stats.nIoRetriesSinceInit); 00123 target.writeCounter( 00124 "CachePagesPrefetched", stats.nSuccessfulPrefetches); 00125 target.writeCounter( 00126 "CachePagesPrefetchedSinceInit", 00127 stats.nSuccessfulPrefetchesSinceInit); 00128 target.writeCounter("CacheLazyWrites", stats.nLazyWrites); 00129 target.writeCounter("CacheLazyWritesSinceInit", stats.nLazyWritesSinceInit); 00130 target.writeCounter("CacheLazyWriteCalls", stats.nLazyWriteCalls); 00131 target.writeCounter( 00132 "CacheLazyWriteCallsSinceInit", 00133 stats.nLazyWriteCallsSinceInit); 00134 target.writeCounter("CacheVictimizationWrites", stats.nVictimizationWrites); 00135 target.writeCounter( 00136 "CacheVictimizationWritesSinceInit", 00137 stats.nVictimizationWritesSinceInit); 00138 target.writeCounter("CacheCheckpointWrites", stats.nCheckpointWrites); 00139 target.writeCounter( 00140 "CacheCheckpointWritesSinceInit", 00141 stats.nCheckpointWritesSinceInit); 00142 target.writeCounter( 00143 "CachePagesAllocated", stats.nMemPagesAllocated); 00144 target.writeCounter( 00145 "CachePagesUnused", stats.nMemPagesUnused); 00146 target.writeCounter( 00147 "CachePagesAllocationLimit", stats.nMemPagesMax); 00148 }
virtual void Cache::notifyTransferCompletion | ( | CachePage & | , | |
bool | bSuccess | |||
) | [private, pure virtual] |
Implemented in CacheImpl< PageT, VictimPolicyT >.
Referenced by CachePage::notifyTransferCompletion().
virtual void Cache::markPageDirty | ( | CachePage & | ) | [private, pure virtual] |
Implemented in CacheImpl< PageT, VictimPolicyT >.
virtual void ClosableObject::closeImpl | ( | ) | [protected, pure virtual, inherited] |
Must be implemented by derived class to release any resources.
Implemented in CacheImpl< PageT, VictimPolicyT >, ByteArrayInputStream, ByteArrayOutputStream, ByteOutputStream, CheckpointThread, Database, BarrierExecStream, DoubleBufferExecStream, ExecStream, ExecStreamGraphImpl, MockResourceExecStream, ReshapeExecStream, ScratchBufferExecStream, SegBufferExecStream, SegBufferReader, SegBufferReaderExecStream, SegBufferWriter, SegBufferWriterExecStream, JavaSinkExecStream, JavaTransformExecStream, FlatFileBuffer, FlatFileExecStreamImpl, BTreeExecStream, BTreeInsertExecStream, BTreePrefetchSearchExecStream, BTreeReadExecStream, BTreeSearchExecStream, FtrsTableWriterExecStream, LhxAggExecStream, LhxJoinExecStream, LbmBitOpExecStream, LbmChopperExecStream, LbmGeneratorExecStream, LbmIntersectExecStream, LbmMinusExecStream, LbmSplicerExecStream, LbmUnionExecStream, LcsClusterAppendExecStream, LcsRowScanBaseExecStream, LcsRowScanExecStream, DelegatingSegment, DynamicDelegatingSegment, ScratchSegment, SegInputStream, Segment, SegOutputStream, SegPageBackupRestoreDevice, SegStream, SegStreamAllocation, SpillOutputStream, and ExternalSortExecStreamImpl.
Referenced by ClosableObject::close().
bool ClosableObject::isClosed | ( | ) | const [inline, inherited] |
Definition at line 58 of file ClosableObject.h.
00059 { 00060 return !needsClose; 00061 }
void ClosableObject::close | ( | ) | [inherited] |
Closes this object, releasing any unallocated resources.
Reimplemented in CollectExecStream, CorrelationJoinExecStream, LcsClusterAppendExecStream, and LcsClusterReplaceExecStream.
Definition at line 39 of file ClosableObject.cpp.
References ClosableObject::closeImpl(), and ClosableObject::needsClose.
Referenced by CacheImpl< PageT, VictimPolicyT >::allocatePages(), LcsRowScanBaseExecStream::closeImpl(), ExecStreamGraphImpl::closeImpl(), FlatFileBuffer::open(), ClosableObjectDestructor::operator()(), and Segment::~Segment().
00040 { 00041 if (!needsClose) { 00042 return; 00043 } 00044 needsClose = false; 00045 closeImpl(); 00046 }
virtual CachePage* CacheAccessor::lockPage | ( | BlockId | blockId, | |
LockMode | lockMode, | |||
bool | readIfUnmapped = true , |
|||
MappedPageListener * | pMappedPageListener = NULL , |
|||
TxnId | txnId = IMPLICIT_TXN_ID | |||
) | [pure virtual, inherited] |
Locks a page into memory with the specified concurrency mode.
When the page contents are no longer needed, the caller must invoke the unlockPage() method with the same concurrency mode to release it. If the desired page is already locked by another thread with an incompatible concurrency mode, blocks until the page becomes available (unless the lock mode is of the NoWait variety, in which case returns NULL immediately). Note that NoWait locking only applies to lock contention, not I/O, so if an unmapped page is locked in NoWait mode, blocks until the read completes.
The device referenced by the requested blockId must already be registered with the cache and must remain registered for the duration of the lock.
Notes on concurrency modes:
blockId | the BlockId of the page to be locked | |
lockMode | the desired concurrency mode | |
readIfUnmapped | if true (the default) the page data is read as part of mapping; if false, the page data is left invalid until first write (used when allocating a new block with invalid contents) | |
pMappedPageListener | optional listener to receive notifications when this page is written; if specified, it must match all prior and subsequent lock requests for the same page mapping | |
txnId | optional TxnId to associate with lock; default is IMPLICIT_TXN_ID, which uses current thread ID as an implicit TxnId |
Implemented in CacheImpl< PageT, VictimPolicyT >, DelegatingCacheAccessor, QuotaCacheAccessor, TransactionalCacheAccessor, and ScratchSegment.
Referenced by CacheTest::lockPage().
virtual void CacheAccessor::unlockPage | ( | CachePage & | page, | |
LockMode | lockMode, | |||
TxnId | txnId = IMPLICIT_TXN_ID | |||
) | [pure virtual, inherited] |
Releases lock held on page.
page | the page to be unlocked | |
lockMode | must correspond to value passed to Cache::lockPage; however, for pages locked with NOWAIT, the equivalent unlock type should be normal (e.g. LOCKMODE_S instead of LOCKMODE_S_NOWAIT) | |
txnId | must correspond to value passed to Cache::lockPage |
Implemented in CacheImpl< PageT, VictimPolicyT >, DelegatingCacheAccessor, QuotaCacheAccessor, TransactionalCacheAccessor, and ScratchSegment.
Referenced by PagingTestBase::testScratch(), SegmentTestBase::unlockPage(), and CacheTest::unlockPage().
virtual void CacheAccessor::discardPage | ( | BlockId | blockId | ) | [pure virtual, inherited] |
Unmaps a page from the cache if already mapped, discarding its contents if dirty.
The caller must ensure that no other thread has the page locked.
blockId | the BlockId of the page to be discarded |
Implemented in CacheImpl< PageT, VictimPolicyT >, DelegatingCacheAccessor, and ScratchSegment.
virtual bool CacheAccessor::prefetchPage | ( | BlockId | blockId, | |
MappedPageListener * | pMappedPageListener = NULL | |||
) | [pure virtual, inherited] |
Hints that a page should be prefetched in preparation for a future lock request.
blockId | the BlockId of the page to be prefetched | |
pMappedPageListener | optional listener to receive notifications when this page is written; if specified, it must match all prior and subsequent lock requests for the same page mapping |
Implemented in CacheImpl< PageT, VictimPolicyT >, DelegatingCacheAccessor, and ScratchSegment.
Referenced by SegmentTestBase::prefetchPage(), and CacheTest::prefetchPage().
virtual void CacheAccessor::prefetchBatch | ( | BlockId | blockId, | |
uint | nPages, | |||
MappedPageListener * | pMappedPageListener = NULL | |||
) | [pure virtual, inherited] |
Hints that a contiguous run of pages should be prefetched.
blockId | the BlockId of the first page to be prefetched; more will be prefetched depending on the configured batch size | |
nPages | number of pages in batch | |
pMappedPageListener | optional listener to receive notifications when this page is written; if specified, it must match all prior and subsequent lock requests for the same page mapping |
Implemented in CacheImpl< PageT, VictimPolicyT >, DelegatingCacheAccessor, and ScratchSegment.
Referenced by CacheTest::prefetchBatch().
virtual void CacheAccessor::flushPage | ( | CachePage & | page, | |
bool | async | |||
) | [pure virtual, inherited] |
Forces the contents of a dirty page to its mapped location.
Page must already be locked in exclusive mode. For an asynchronous flush, the caller must ensure that the page contents remain unchanged until the flush completes.
page | the page to be flushed | |
async | true to schedle async write and return immediately; false to wait for write to complete |
Implemented in CacheImpl< PageT, VictimPolicyT >, DelegatingCacheAccessor, and ScratchSegment.
virtual void CacheAccessor::nicePage | ( | CachePage & | page | ) | [pure virtual, inherited] |
Marks a page as nice, indicating that it is very unlikely the page's mapping will be needed again any time soon, so it is a good candidate for victimization.
page | the page to be marked |
Implemented in CacheImpl< PageT, VictimPolicyT >, DelegatingCacheAccessor, and ScratchSegment.
Referenced by PagingTestBase::testOp().
virtual void CacheAccessor::getPrefetchParams | ( | uint & | prefetchPagesMax, | |
uint & | prefetchThrottleRate | |||
) | [pure virtual, inherited] |
Retrieves the current pre-fetch caching parameters that determine how many pages should be pre-fetched and how often the pre-fetches should occur.
[out] | prefetchPagesMax | max number of outstanding pre-fetch pages |
[out] | prefetchThrottleRate | the number of successful pre-fetches that have to occur before the pre-fetch rate is throttled back up, in the event that it has been throttled down due to rejected requests |
Implemented in CacheImpl< PageT, VictimPolicyT >, DelegatingCacheAccessor, and ScratchSegment.
uint Cache::cbPage [protected] |
const DeviceId Cache::NULL_DEVICE_ID [static] |
The DeviceId assigned to the instance of RandomAccessNullDevice associated with every cache.
This device is automatically registered when the cache is opened and unregistered when the cache is closed. Scratch pages have this DeviceId in their BlockIds, but no real blocks can ever be mapped to this device.
Definition at line 74 of file Cache.h.
Referenced by CacheImpl< PageT, VictimPolicyT >::closeImpl(), CachePage::isScratchLocked(), ScratchSegment::lockPage(), and ScratchSegment::translatePageId().
bool ClosableObject::needsClose [protected, inherited] |
Definition at line 44 of file ClosableObject.h.
Referenced by SegStreamAllocation::beginWrite(), ExecStreamGraphImpl::clear(), ClosableObject::ClosableObject(), ClosableObject::close(), FlatFileBuffer::open(), ExecStreamGraphImpl::open(), ExecStream::open(), and ClosableObject::~ClosableObject().