DataCache
Description
- Derived from
- 
Disposable abstract 
 ICacheCallback<int64>
 IBeginEndSync
- Extended by
- 
FileCache sealed 
 ObjectDataCache abstract
Base class for objects that implement a thread-safe and page based cache for a number of independent source data objects.
Public / Methods
Access
Accesses a cache page.
The returned cache page can be accessed safely by the calling thread until it calls one of the following methods:
- 
Access, 
 IBeginEnd.End,
 Flush:
 Another thread might perform a re-entrant call, causing the cache page of the calling thread to become evicted from the cache. This can be avoided by calling LockPage and UnlockPage properly.
- 
Release2, 
 SourceIdRelease:
 If the cache page is evicted by the call, it can no longer be accessed.
- IOException
- 
If an I/O error has occurred in IDataCacheObject.CacheReadPage or IDataCacheObject.CacheWritePage for the given source data object. 
Flush
Flushes all dirty cache pages of the given source object.
- IOException
- 
If an I/O error has occurred in IDataCacheObject.CacheReadPage or IDataCacheObject.CacheWritePage for the given source data object. 
- See also
LockPage
Locks a cache page.
Locked pages cannot be evicted from the cache. For each call to LockPage, the UnlockPage method must be called once to unlock the page.
- See also
Release
2 overloads
Releases a page.
If the given page is not present in the cache, the method returns silently.
- IOException
- 
If an I/O error has occurred in IDataCacheObject.CacheReadPage or IDataCacheObject.CacheWritePage for the given source data object. 
Releases a range of source file pages.
If the given page is not present in the cache, the method returns silently.
- IOException
- 
If an I/O error has occurred in IDataCacheObject.CacheReadPage or IDataCacheObject.CacheWritePage for the given source data object. 
SourceIdAllocate
Allocates a source ID in this cache for the given source data object.
- IOException
- 
If all source ID values are already in use. 
- See also
SourceIdRelease
Releases a source ID.
- IOException
- 
If an I/O error has occurred in IDataCacheObject.CacheReadPage or IDataCacheObject.CacheWritePage for the given source data object. 
- See also
UnlockPage
Unlocks a cache page.
Locked pages cannot be evicted from the cache. For each call to LockPage, the UnlockPage method must be called once to unlock the page.
- See also