Interface JournalFile
-
- All Known Implementing Classes:
AwsJournalFile,AzureJournalFile,AzureJournalFileV8,LocalJournalFile,SplitJournalFile
public interface JournalFileThe journal is a special, atomically updated file that records the state of the repository as a sequence of references to successive root node records. See oak-segment-tar documentation for more details.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanexists()Check if the journal already exists.StringgetName()Return the name representing the journal file.JournalFileReaderopenJournalReader()Opens the journal file for reading.JournalFileWriteropenJournalWriter()Opens the journal file for writing.
-
-
-
Method Detail
-
openJournalReader
JournalFileReader openJournalReader() throws IOException
Opens the journal file for reading. The returned object will represent the current state of the journal. Subsequent writes made by theJournalFileWriterwon't be visible until a newJournalFileReaderis opened.- Returns:
- the reader representing the current state of the journal
- Throws:
IOException
-
openJournalWriter
JournalFileWriter openJournalWriter() throws IOException
Opens the journal file for writing.- Returns:
- Throws:
IOException
-
getName
String getName()
Return the name representing the journal file.- Returns:
- name (eg. file name) representing the journal
-
exists
boolean exists()
Check if the journal already exists.- Returns:
trueif the journal has been already created by theJournalFileWriter
-
-