public interface OReadCache
Model of this cache is based on page model. All direct memory area is mapped to disk files and each file is split on pages. Page is smallest unit of work. The amount of RAM which can be used for data manipulation is limited so only a subset of data will be really loaded into RAM on demand, if there is not enough RAM to store all data, part of them will by flushed to the disk. If disk cache is closed all changes will be flushed to the disk.
Modifier and Type | Field and Description |
---|---|
static int |
MIN_CACHE_SIZE
Minimum size of memory which may be allocated by cache (in pages).
|
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 calculateReadCacheMaxMemory) |
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) |
static final int MIN_CACHE_SIZE
long addFile(String fileName, OWriteCache writeCache) throws IOException
IOException
long addFile(String fileName, long fileId, OWriteCache writeCache) throws IOException
IOException
OCacheEntry loadForWrite(long fileId, long pageIndex, boolean checkPinnedPages, OWriteCache writeCache, boolean verifyChecksums, OLogSequenceNumber startLSN) throws IOException
IOException
OCacheEntry loadForRead(long fileId, long pageIndex, boolean checkPinnedPages, OWriteCache writeCache, boolean verifyChecksums) throws IOException
IOException
void releaseFromRead(OCacheEntry cacheEntry, OWriteCache writeCache)
void releaseFromWrite(OCacheEntry cacheEntry, OWriteCache writeCache, boolean changed)
OCacheEntry allocateNewPage(long fileId, OWriteCache writeCache, OLogSequenceNumber startLSN) throws IOException
IOException
long getUsedMemory()
void clear()
void truncateFile(long fileId, OWriteCache writeCache) throws IOException
IOException
void closeFile(long fileId, boolean flush, OWriteCache writeCache)
void deleteFile(long fileId, OWriteCache writeCache) throws IOException
IOException
void deleteStorage(OWriteCache writeCache) throws IOException
IOException
void closeStorage(OWriteCache writeCache) throws IOException
writeCache
- Write cache to close.IOException
void changeMaximumAmountOfMemory(long calculateReadCacheMaxMemory)
Copyright © 2009–2020 OrientDB. All rights reserved.