
public final class AsyncReadCache extends Object implements OReadCache
| Constructor and Description |
|---|
AsyncReadCache(OByteBufferPool bufferPool,
long maxCacheSizeInBytes,
int pageSize,
boolean trackHitRate) |
| Modifier and Type | Method and Description |
|---|---|
long |
addFile(String fileName,
long fileId,
OWriteCache writeCache) |
long |
addFile(String fileName,
OWriteCache writeCache) |
OCacheEntry |
allocateNewPage(long fileId,
OWriteCache writeCache,
OLogSequenceNumber startLSN) |
void |
changeMaximumAmountOfMemory(long maxMemory) |
void |
clear() |
void |
closeFile(long fileId,
boolean flush,
OWriteCache writeCache) |
void |
closeStorage(OWriteCache writeCache)
Closes all files inside of write cache and flushes all associated data.
|
void |
deleteFile(long fileId,
OWriteCache writeCache) |
void |
deleteStorage(OWriteCache writeCache) |
long |
getUsedMemory() |
void |
loadCacheState(OWriteCache writeCache)
Load state of cache from file system if possible.
|
OCacheEntry |
loadForRead(long fileId,
long pageIndex,
boolean checkPinnedPages,
OWriteCache writeCache,
int pageCount,
boolean verifyChecksums) |
OCacheEntry |
loadForWrite(long fileId,
long pageIndex,
boolean checkPinnedPages,
OWriteCache writeCache,
int pageCount,
boolean verifyChecksums,
OLogSequenceNumber startLSN) |
void |
pinPage(OCacheEntry cacheEntry,
OWriteCache writeCache) |
void |
releaseFromRead(OCacheEntry cacheEntry,
OWriteCache writeCache) |
void |
releaseFromWrite(OCacheEntry cacheEntry,
OWriteCache writeCache) |
OCacheEntry |
silentLoadForRead(long extFileId,
int pageIndex,
OWriteCache writeCache,
boolean verifyChecksums)
Loads page from the disk cache if it is already loaded otherwise loads it from disk but does
not put it the disk cache.
|
void |
storeCacheState(OWriteCache writeCache)
Stores state of cache inside file if possible.
|
void |
truncateFile(long fileId,
OWriteCache writeCache) |
public AsyncReadCache(OByteBufferPool bufferPool, long maxCacheSizeInBytes, int pageSize, boolean trackHitRate)
public final long addFile(String fileName, OWriteCache writeCache) throws IOException
addFile in interface OReadCacheIOExceptionpublic final long addFile(String fileName, long fileId, OWriteCache writeCache) throws IOException
addFile in interface OReadCacheIOExceptionpublic final OCacheEntry loadForWrite(long fileId, long pageIndex, boolean checkPinnedPages, OWriteCache writeCache, int pageCount, boolean verifyChecksums, OLogSequenceNumber startLSN)
loadForWrite in interface OReadCachepublic final OCacheEntry loadForRead(long fileId, long pageIndex, boolean checkPinnedPages, OWriteCache writeCache, int pageCount, boolean verifyChecksums)
loadForRead in interface OReadCachepublic OCacheEntry silentLoadForRead(long extFileId, int pageIndex, OWriteCache writeCache, boolean verifyChecksums)
OReadCachesilentLoadForRead in interface OReadCachepublic final void changeMaximumAmountOfMemory(long maxMemory)
changeMaximumAmountOfMemory in interface OReadCachepublic final void releaseFromRead(OCacheEntry cacheEntry, OWriteCache writeCache)
releaseFromRead in interface OReadCachepublic final void releaseFromWrite(OCacheEntry cacheEntry, OWriteCache writeCache)
releaseFromWrite in interface OReadCachepublic final void pinPage(OCacheEntry cacheEntry, OWriteCache writeCache)
pinPage in interface OReadCachepublic final OCacheEntry allocateNewPage(long fileId, OWriteCache writeCache, OLogSequenceNumber startLSN) throws IOException
allocateNewPage in interface OReadCacheIOExceptionpublic final long getUsedMemory()
getUsedMemory in interface OReadCachepublic final void clear()
clear in interface OReadCachepublic final void truncateFile(long fileId,
OWriteCache writeCache)
throws IOException
truncateFile in interface OReadCacheIOExceptionpublic final void closeFile(long fileId,
boolean flush,
OWriteCache writeCache)
closeFile in interface OReadCachepublic final void deleteFile(long fileId,
OWriteCache writeCache)
throws IOException
deleteFile in interface OReadCacheIOExceptionpublic final void deleteStorage(OWriteCache writeCache) throws IOException
deleteStorage in interface OReadCacheIOExceptionpublic final void closeStorage(OWriteCache writeCache) throws IOException
OReadCachecloseStorage in interface OReadCachewriteCache - Write cache to close.IOExceptionpublic final void loadCacheState(OWriteCache writeCache)
OReadCacheloadCacheState in interface OReadCachewriteCache - Write cache is used to load pages back into cache if possible.public final void storeCacheState(OWriteCache writeCache)
OReadCachestoreCacheState in interface OReadCachewriteCache - Write cache which manages files cache state of which is going to be stored.Copyright © 2009–2025 OrientDB. All rights reserved.