
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) |
OCacheEntry |
silentLoadForRead(long extFileId,
int pageIndex,
OWriteCache writeCache,
boolean verifyChecksums) |
void |
truncateFile(long fileId,
OWriteCache writeCache) |
static final int MIN_CACHE_SIZE
long addFile(String fileName, OWriteCache writeCache) throws IOException
IOExceptionlong addFile(String fileName, long fileId, OWriteCache writeCache) throws IOException
IOExceptionOCacheEntry loadForWrite(long fileId, long pageIndex, boolean checkPinnedPages, OWriteCache writeCache, boolean verifyChecksums, OLogSequenceNumber startLSN) throws IOException
IOExceptionOCacheEntry loadForRead(long fileId, long pageIndex, boolean checkPinnedPages, OWriteCache writeCache, boolean verifyChecksums) throws IOException
IOExceptionOCacheEntry silentLoadForRead(long extFileId, int pageIndex, OWriteCache writeCache, boolean verifyChecksums)
void releaseFromRead(OCacheEntry cacheEntry, OWriteCache writeCache)
void releaseFromWrite(OCacheEntry cacheEntry, OWriteCache writeCache, boolean changed)
OCacheEntry allocateNewPage(long fileId, OWriteCache writeCache, OLogSequenceNumber startLSN) throws IOException
IOExceptionlong getUsedMemory()
void clear()
void truncateFile(long fileId,
OWriteCache writeCache)
throws IOException
IOExceptionvoid closeFile(long fileId,
boolean flush,
OWriteCache writeCache)
void deleteFile(long fileId,
OWriteCache writeCache)
throws IOException
IOExceptionvoid deleteStorage(OWriteCache writeCache) throws IOException
IOExceptionvoid closeStorage(OWriteCache writeCache) throws IOException
writeCache - Write cache to close.IOExceptionvoid changeMaximumAmountOfMemory(long calculateReadCacheMaxMemory)
Copyright © 2009–2025 OrientDB. All rights reserved.