public class RaftLog extends io.atomix.storage.journal.DelegatingJournal<RaftLogEntry>
| Modifier and Type | Class and Description |
|---|---|
static class |
RaftLog.Builder
Raft log builder.
|
| Modifier and Type | Method and Description |
|---|---|
static RaftLog.Builder |
builder()
Deprecated.
|
void |
compact(long index)
Compacts the journal up to the given index.
|
long |
getCompactableIndex(long index)
Returns the index of the last segment in the log.
|
boolean |
isCompactable(long index)
Returns a boolean indicating whether a segment can be removed from the journal prior to the given index.
|
static RaftLog.Builder |
newBuilder()
Returns a new Raft log builder.
|
RaftLogReader |
openReader(long index) |
RaftLogReader |
openReader(long index,
RaftLogReader.Mode mode)
Opens a new Raft log reader with the given reader mode.
|
RaftLogWriter |
writer() |
@Deprecated public static RaftLog.Builder builder()
public static RaftLog.Builder newBuilder()
public RaftLogWriter writer()
writer in interface io.atomix.storage.journal.Journal<RaftLogEntry>writer in class io.atomix.storage.journal.DelegatingJournal<RaftLogEntry>public RaftLogReader openReader(long index)
openReader in interface io.atomix.storage.journal.Journal<RaftLogEntry>openReader in class io.atomix.storage.journal.DelegatingJournal<RaftLogEntry>public RaftLogReader openReader(long index, RaftLogReader.Mode mode)
index - The index from which to begin reading entries.mode - The mode in which to read entries.public boolean isCompactable(long index)
index - the index from which to remove segmentspublic long getCompactableIndex(long index)
index - the compaction indexpublic void compact(long index)
The semantics of compaction are not specified by this interface.
index - The index up to which to compact the journal.Copyright © 2013–2017. All rights reserved.