public class SegmentedRaftLog extends RaftLogBase
| 限定符和类型 | 类和说明 |
|---|---|
static class |
RaftLogSequentialOps.Runner |
RaftLog.EntryWithDataINVALID_LOG_INDEX, LEAST_VALID_LOG_INDEX| 构造器和说明 |
|---|
SegmentedRaftLog(RaftGroupMemberId memberId,
RaftServer.Division server,
StateMachine stateMachine,
Consumer<org.apache.ratis.proto.RaftProtos.LogEntryProto> notifyTruncatedLogEntry,
Runnable submitUpdateCommitEvent,
RaftStorage storage,
LongSupplier snapshotIndexSupplier,
RaftProperties properties) |
append, append, append, 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 SegmentedRaftLog(RaftGroupMemberId memberId, RaftServer.Division server, StateMachine stateMachine, Consumer<org.apache.ratis.proto.RaftProtos.LogEntryProto> notifyTruncatedLogEntry, Runnable submitUpdateCommitEvent, RaftStorage storage, LongSupplier snapshotIndexSupplier, RaftProperties properties)
public SegmentedRaftLogMetrics getRaftLogMetrics()
protected void openImpl(long lastIndexInSnapshot,
Consumer<org.apache.ratis.proto.RaftProtos.LogEntryProto> consumer)
throws IOException
openImpl 在类中 RaftLogBaseIOExceptionpublic long getStartIndex()
public org.apache.ratis.proto.RaftProtos.LogEntryProto get(long index) throws RaftLogIOException
public RaftLog.EntryWithData getEntryWithData(long index) throws RaftLogIOException
public TermIndex getTermIndex(long index)
public LogEntryHeader[] getEntries(long startIndex, long endIndex)
public TermIndex getLastEntryTermIndex()
protected CompletableFuture<Long> truncateImpl(long index)
truncateImpl 在类中 RaftLogBaseprotected CompletableFuture<Long> purgeImpl(long index)
purgeImpl 在类中 RaftLogBaseprotected CompletableFuture<Long> appendEntryImpl(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
appendEntryImpl 在类中 RaftLogBasepublic List<CompletableFuture<Long>> appendImpl(List<org.apache.ratis.proto.RaftProtos.LogEntryProto> entries)
appendImpl 在类中 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 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 RaftLogBaseIOExceptionpublic String toLogEntryString(org.apache.ratis.proto.RaftProtos.LogEntryProto logEntry)
toLogEntryString 在类中 RaftLogBase@Deprecated public List<CompletableFuture<Long>> append(org.apache.ratis.proto.RaftProtos.LogEntryProto... arg0)
Copyright © 2017–2022 The Apache Software Foundation. All rights reserved.