Class LocalJournalFile
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.file.tar.LocalJournalFile
-
- All Implemented Interfaces:
JournalFile
public class LocalJournalFile extends Object implements JournalFile
-
-
Constructor Summary
Constructors Constructor Description LocalJournalFile(File journalFile)
LocalJournalFile(File directory, String journalFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
exists()
Check if the journal already exists.String
getName()
Return the name representing the journal file.JournalFileReader
openJournalReader()
Opens the journal file for reading.JournalFileWriter
openJournalWriter()
Opens the journal file for writing.
-
-
-
Method Detail
-
openJournalReader
public JournalFileReader openJournalReader() throws IOException
Description copied from interface:JournalFile
Opens the journal file for reading. The returned object will represent the current state of the journal. Subsequent writes made by theJournalFileWriter
won't be visible until a newJournalFileReader
is opened.- Specified by:
openJournalReader
in interfaceJournalFile
- Returns:
- the reader representing the current state of the journal
- Throws:
IOException
-
openJournalWriter
public JournalFileWriter openJournalWriter() throws IOException
Description copied from interface:JournalFile
Opens the journal file for writing.- Specified by:
openJournalWriter
in interfaceJournalFile
- Returns:
- Throws:
IOException
-
getName
public String getName()
Description copied from interface:JournalFile
Return the name representing the journal file.- Specified by:
getName
in interfaceJournalFile
- Returns:
- name (eg. file name) representing the journal
-
exists
public boolean exists()
Description copied from interface:JournalFile
Check if the journal already exists.- Specified by:
exists
in interfaceJournalFile
- Returns:
true
if the journal has been already created by theJournalFileWriter
-
-