public class MemoryRaftLog extends RaftLogBase
| 限定符和类型 | 类和说明 |
|---|---|
static class |
RaftLogSequentialOps.Runner |
RaftLog.EntryWithDataINVALID_LOG_INDEX, LEAST_VALID_LOG_INDEX| 构造器和说明 |
|---|
MemoryRaftLog(RaftGroupMemberId memberId,
LongSupplier commitIndexSupplier,
RaftProperties properties) |
| 限定符和类型 | 方法和说明 |
|---|---|
default List<CompletableFuture<Long>> |
append(org.apache.ratis.proto.RaftProtos.LogEntryProto... arg0)
已过时。
|
protected CompletableFuture<Long> |
appendEntryImpl(org.apache.ratis.proto.RaftProtos.LogEntryProto entry) |
List<CompletableFuture<Long>> |
appendImpl(List<org.apache.ratis.proto.RaftProtos.LogEntryProto> logEntryProtos) |
void |
close() |
org.apache.ratis.proto.RaftProtos.LogEntryProto |
get(long index) |
LogEntryHeader[] |
getEntries(long startIndex,
long endIndex) |
String |
getEntryString() |
RaftLog.EntryWithData |
getEntryWithData(long index) |
long |
getFlushIndex() |
TermIndex |
getLastEntryTermIndex() |
RaftLogMetricsBase |
getRaftLogMetrics() |
long |
getStartIndex() |
TermIndex |
getTermIndex(long index) |
RaftStorageMetadata |
loadMetadata() |
CompletableFuture<Long> |
onSnapshotInstalled(long lastSnapshotIndex) |
void |
persistMetadata(RaftStorageMetadata newMetadata) |
protected CompletableFuture<Long> |
purgeImpl(long index) |
protected CompletableFuture<Long> |
truncateImpl(long index) |
append, append, append, appendEntry, appendMetadata, checkLogState, getLastCommittedIndex, getName, getSnapshotIndex, hasReadLock, hasWriteLock, isOpened, newEntryWithData, open, openImpl, purge, readLock, toLogEntryString, toString, truncate, updateCommitIndex, updateSnapshotIndex, updateSnapshotIndexFromStateMachine, validateLogEntry, writeLockclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcontains, getNextIndexpublic MemoryRaftLog(RaftGroupMemberId memberId, LongSupplier commitIndexSupplier, RaftProperties properties)
public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 RaftLogBaseIOExceptionpublic RaftLogMetricsBase getRaftLogMetrics()
public org.apache.ratis.proto.RaftProtos.LogEntryProto get(long index)
public RaftLog.EntryWithData getEntryWithData(long index)
public TermIndex getTermIndex(long index)
public LogEntryHeader[] getEntries(long startIndex, long endIndex)
protected CompletableFuture<Long> truncateImpl(long index)
truncateImpl 在类中 RaftLogBaseprotected CompletableFuture<Long> purgeImpl(long index)
purgeImpl 在类中 RaftLogBasepublic TermIndex getLastEntryTermIndex()
protected CompletableFuture<Long> appendEntryImpl(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
appendEntryImpl 在类中 RaftLogBasepublic long getStartIndex()
public List<CompletableFuture<Long>> appendImpl(List<org.apache.ratis.proto.RaftProtos.LogEntryProto> logEntryProtos)
appendImpl 在类中 RaftLogBasepublic String getEntryString()
public long getFlushIndex()
public void persistMetadata(RaftStorageMetadata newMetadata)
public RaftStorageMetadata loadMetadata()
public CompletableFuture<Long> onSnapshotInstalled(long lastSnapshotIndex)
@Deprecated public List<CompletableFuture<Long>> append(org.apache.ratis.proto.RaftProtos.LogEntryProto... arg0)
Copyright © 2017–2022 The Apache Software Foundation. All rights reserved.