public interface JournalFileWriter extends Closeable
JournalFilewriter. It allows to append a record to the journal file (or create a new one, if it doesn't exist).
The implementation doesn't need to be thread-safe (eg. the caller has to take
care of synchronizing the
writeLine(String) method calls), but the method
void truncate() throws IOException
JournalFileReaderand shouldn't be used in the concurrent environment.
void writeLine(String line) throws IOException
JournalFile.openJournalReader()in the way that it'll have access to an incomplete record line.
If this method returns successfully it means that the line was persisted
on the non-volatile storage. For instance, on the local disk the
flush() should be called by the implementation.
line- the journal record to be written
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.