public final class SegmentedRaftLog extends RaftLogBase
| Modifier and Type | Class and Description |
|---|---|
static class |
RaftLogSequentialOps.Runner |
static class |
SegmentedRaftLog.Builder |
RaftLog.EntryWithDataINVALID_LOG_INDEX, LEAST_VALID_LOG_INDEXappend, append, append, appendEntry, appendEntry, appendMetadata, checkLogState, getLastCommittedIndex, getName, getSnapshotIndex, hasReadLock, hasWriteLock, isOpened, newEntryWithData, open, purge, readLock, toString, truncate, updateCommitIndex, updateSnapshotIndex, updateSnapshotIndexFromStateMachine, validateLogEntry, writeLockclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcontains, getNextIndexpublic SegmentedRaftLogMetrics getRaftLogMetrics()
protected void openImpl(long lastIndexInSnapshot,
Consumer<org.apache.ratis.proto.RaftProtos.LogEntryProto> consumer)
throws IOException
openImpl in class RaftLogBaseIOExceptionpublic long getStartIndex()
public org.apache.ratis.proto.RaftProtos.LogEntryProto get(long index) throws RaftLogIOException
RaftLogIOExceptionpublic RaftLog.EntryWithData getEntryWithData(long index) throws RaftLogIOException
RaftLogIOExceptionpublic TermIndex getTermIndex(long index)
public LogEntryHeader[] getEntries(long startIndex, long endIndex)
public TermIndex getLastEntryTermIndex()
protected CompletableFuture<Long> truncateImpl(long index)
truncateImpl in class RaftLogBaseprotected CompletableFuture<Long> purgeImpl(long index)
purgeImpl in class RaftLogBaseprotected CompletableFuture<Long> appendEntryImpl(org.apache.ratis.proto.RaftProtos.LogEntryProto entry, TransactionContext context)
appendEntryImpl in class RaftLogBasepublic List<CompletableFuture<Long>> appendImpl(List<org.apache.ratis.proto.RaftProtos.LogEntryProto> entries)
appendImpl in class RaftLogBasepublic long getFlushIndex()
public void persistMetadata(RaftStorageMetadata metadata) throws IOException
IOExceptionpublic RaftStorageMetadata loadMetadata() throws IOException
IOExceptionpublic CompletableFuture<Long> onSnapshotInstalled(long lastSnapshotIndex)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class RaftLogBaseIOExceptionpublic String toLogEntryString(org.apache.ratis.proto.RaftProtos.LogEntryProto logEntry)
toLogEntryString in class RaftLogBasepublic static SegmentedRaftLog.Builder newBuilder()
@Deprecated public List<CompletableFuture<Long>> append(org.apache.ratis.proto.RaftProtos.LogEntryProto... arg0)
Copyright © 2017–2023 The Apache Software Foundation. All rights reserved.