public final class AsyncReadCache extends Object implements OReadCache
MIN_CACHE_SIZE
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() |
OCacheEntry |
loadForRead(long fileId,
long pageIndex,
boolean checkPinnedPages,
OWriteCache writeCache,
boolean verifyChecksums) |
OCacheEntry |
loadForWrite(long fileId,
long pageIndex,
boolean checkPinnedPages,
OWriteCache writeCache,
boolean verifyChecksums,
OLogSequenceNumber startLSN) |
void |
releaseFromRead(OCacheEntry cacheEntry,
OWriteCache writeCache) |
void |
releaseFromWrite(OCacheEntry cacheEntry,
OWriteCache writeCache,
boolean changed) |
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 OReadCache
IOException
public final long addFile(String fileName, long fileId, OWriteCache writeCache) throws IOException
addFile
in interface OReadCache
IOException
public final OCacheEntry loadForWrite(long fileId, long pageIndex, boolean checkPinnedPages, OWriteCache writeCache, boolean verifyChecksums, OLogSequenceNumber startLSN)
loadForWrite
in interface OReadCache
public final OCacheEntry loadForRead(long fileId, long pageIndex, boolean checkPinnedPages, OWriteCache writeCache, boolean verifyChecksums)
loadForRead
in interface OReadCache
public final void changeMaximumAmountOfMemory(long maxMemory)
changeMaximumAmountOfMemory
in interface OReadCache
public final void releaseFromRead(OCacheEntry cacheEntry, OWriteCache writeCache)
releaseFromRead
in interface OReadCache
public final void releaseFromWrite(OCacheEntry cacheEntry, OWriteCache writeCache, boolean changed)
releaseFromWrite
in interface OReadCache
public final OCacheEntry allocateNewPage(long fileId, OWriteCache writeCache, OLogSequenceNumber startLSN) throws IOException
allocateNewPage
in interface OReadCache
IOException
public final long getUsedMemory()
getUsedMemory
in interface OReadCache
public final void clear()
clear
in interface OReadCache
public final void truncateFile(long fileId, OWriteCache writeCache) throws IOException
truncateFile
in interface OReadCache
IOException
public final void closeFile(long fileId, boolean flush, OWriteCache writeCache)
closeFile
in interface OReadCache
public final void deleteFile(long fileId, OWriteCache writeCache) throws IOException
deleteFile
in interface OReadCache
IOException
public final void deleteStorage(OWriteCache writeCache) throws IOException
deleteStorage
in interface OReadCache
IOException
public final void closeStorage(OWriteCache writeCache) throws IOException
OReadCache
closeStorage
in interface OReadCache
writeCache
- Write cache to close.IOException
Copyright © 2009–2020 OrientDB. All rights reserved.