
public interface OWriteCache
| Modifier and Type | Method and Description |
|---|---|
void |
addBackgroundExceptionListener(OBackgroundExceptionListener listener)
Adds listener which is triggered if exception is cast inside background flush data thread.
|
long |
addFile(String fileName) |
long |
addFile(String fileName,
long fileId) |
void |
addLowDiskSpaceListener(OLowDiskSpaceListener listener) |
void |
addPageIsBrokenListener(OPageIsBrokenListener listener)
Adds listener which is called by cache if corruption of file page is detected.
|
long |
bookFileId(String fileName) |
boolean |
checkLowDiskSpace() |
OPageDataVerificationError[] |
checkStoredPages(OCommandOutputListener commandOutputListener) |
long[] |
close() |
void |
close(long fileId,
boolean flush) |
long[] |
delete() |
void |
deleteFile(long fileId) |
boolean |
exists(long fileId) |
boolean |
exists(String fileName) |
long |
externalFileId(int fileId)
Converts unique internal file id to external one.
|
long |
fileIdByName(String fileName)
Returns id associated with given file or value < 0 if such file does not exist.
|
boolean |
fileIdsAreEqual(long firsId,
long secondId) |
String |
fileNameById(long fileId) |
Map<String,Long> |
files() |
void |
flush() |
void |
flush(long fileId) |
long |
getExclusiveWriteCachePagesSize() |
long |
getFilledUpTo(long fileId) |
int |
getId() |
OPerformanceStatisticManager |
getPerformanceStatisticManager() |
File |
getRootDirectory()
Directory which contains all files managed by write cache.
|
int |
internalFileId(long fileId)
Returns internal file id which is unique and always the same for given file
in contrary to external id which changes over close/open cycle of cache.
|
OCachePointer[] |
load(long fileId,
long startPageIndex,
int pageCount,
boolean addNewPages,
OModifiableBoolean cacheHit,
boolean verifyChecksums) |
long |
loadFile(String fileName)
Registers new file in write cache and returns file id assigned to this file.
|
void |
makeFuzzyCheckpoint() |
int |
pageSize() |
void |
removeBackgroundExceptionListener(OBackgroundExceptionListener listener)
Removes listener which is triggered if exception is cast inside background flush data thread.
|
void |
removeLowDiskSpaceListener(OLowDiskSpaceListener listener) |
void |
removePageIsBrokenListener(OPageIsBrokenListener listener)
Removes listener which is called by cache if corruption of file page is detected.
|
void |
renameFile(long fileId,
String oldFileName,
String newFileName) |
String |
restoreFileById(long fileId)
Finds if there was file in write cache with given id which is deleted right now.
|
void |
startFuzzyCheckpoints() |
Future |
store(long fileId,
long pageIndex,
OCachePointer dataPointer) |
void |
truncateFile(long fileId) |
boolean |
verifyPage(long fileId,
long pageIndex) |
void startFuzzyCheckpoints()
void addPageIsBrokenListener(OPageIsBrokenListener listener)
void removePageIsBrokenListener(OPageIsBrokenListener listener)
void addLowDiskSpaceListener(OLowDiskSpaceListener listener)
void removeLowDiskSpaceListener(OLowDiskSpaceListener listener)
long bookFileId(String fileName) throws IOException
IOExceptionlong loadFile(String fileName) throws IOException
internalFileId(long)fileName - Name of file to register inside storage.IOExceptionlong addFile(String fileName) throws IOException
IOExceptionlong addFile(String fileName, long fileId) throws IOException
IOExceptionlong fileIdByName(String fileName)
fileName - File name id of which has to be returned.boolean checkLowDiskSpace()
void makeFuzzyCheckpoint()
boolean exists(String fileName)
boolean exists(long fileId)
Future store(long fileId, long pageIndex, OCachePointer dataPointer)
OCachePointer[] load(long fileId, long startPageIndex, int pageCount, boolean addNewPages, OModifiableBoolean cacheHit, boolean verifyChecksums) throws IOException
IOExceptionvoid flush(long fileId)
void flush()
long getFilledUpTo(long fileId)
throws IOException
IOExceptionlong getExclusiveWriteCachePagesSize()
void deleteFile(long fileId)
throws IOException
IOExceptionvoid truncateFile(long fileId)
throws IOException
IOExceptionvoid renameFile(long fileId,
String oldFileName,
String newFileName)
throws IOException
IOExceptionlong[] close()
throws IOException
IOExceptionvoid close(long fileId,
boolean flush)
throws IOException
IOExceptionOPageDataVerificationError[] checkStoredPages(OCommandOutputListener commandOutputListener)
long[] delete()
throws IOException
IOExceptionString fileNameById(long fileId)
int getId()
int pageSize()
String restoreFileById(long fileId) throws IOException
fileId - If of file which should be restorednull if such name does not existIOExceptionboolean fileIdsAreEqual(long firsId,
long secondId)
void addBackgroundExceptionListener(OBackgroundExceptionListener listener)
listener - Listener to triggervoid removeBackgroundExceptionListener(OBackgroundExceptionListener listener)
listener - Listener to removeFile getRootDirectory()
null in case of in memory database.int internalFileId(long fileId)
fileId - External file id.long externalFileId(int fileId)
fileId - Internal file id.internalFileId(long),
getId()OPerformanceStatisticManager getPerformanceStatisticManager()
boolean verifyPage(long fileId,
long pageIndex)
throws IOException
IOExceptionCopyright © 2009–2025 OrientDB. All rights reserved.