public class LocalJournalFile extends Object implements JournalFile
Constructor and Description |
---|
LocalJournalFile(File journalFile) |
LocalJournalFile(File directory,
String journalFile) |
Modifier and Type | Method and 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.
|
public LocalJournalFile(File journalFile)
public JournalFileReader openJournalReader() throws IOException
JournalFile
JournalFileWriter
won't be visible until a new
JournalFileReader
is opened.openJournalReader
in interface JournalFile
IOException
public JournalFileWriter openJournalWriter() throws IOException
JournalFile
openJournalWriter
in interface JournalFile
IOException
public String getName()
JournalFile
getName
in interface JournalFile
public boolean exists()
JournalFile
exists
in interface JournalFile
true
if the journal has been already created by the
JournalFileWriter
Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.