Package io.atomix.raft.storage.log
Class RaftLogFlusher.DirectFlusher
java.lang.Object
io.atomix.raft.storage.log.RaftLogFlusher.DirectFlusher
- All Implemented Interfaces:
RaftLogFlusher,CloseableSilently,AutoCloseable
- Enclosing interface:
- RaftLogFlusher
An implementation of
RaftLogFlusher which flushes immediately in a blocking fashion.
After any calls to flush(Journal), any data written before the call is guaranteed to
be on disk.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.atomix.raft.storage.log.RaftLogFlusher
RaftLogFlusher.DirectFlusher, RaftLogFlusher.Factory, RaftLogFlusher.NoopFlusher -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSignals that there is data to be flushed in the journal.booleanisDirect()If this returns true, then any calls toRaftLogFlusher.flush(Journal)are synchronous and immediate, and any guarantees offered by the implementation will hold after a call toRaftLogFlusher.flush(Journal).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.atomix.raft.storage.log.RaftLogFlusher
close
-
Constructor Details
-
DirectFlusher
public DirectFlusher()
-
-
Method Details
-
flush
Description copied from interface:RaftLogFlusherSignals that there is data to be flushed in the journal. The implementation may or may not immediately flush this.- Specified by:
flushin interfaceRaftLogFlusher- Parameters:
journal- the journal to flush
-
isDirect
public boolean isDirect()Description copied from interface:RaftLogFlusherIf this returns true, then any calls toRaftLogFlusher.flush(Journal)are synchronous and immediate, and any guarantees offered by the implementation will hold after a call toRaftLogFlusher.flush(Journal).- Specified by:
isDirectin interfaceRaftLogFlusher
-