public class MemoryRaftLog extends RaftLogBase
| Modifier and Type | Class and Description |
|---|---|
static class |
RaftLogSequentialOps.Runner |
RaftLog.EntryWithDataINVALID_LOG_INDEX, LEAST_VALID_LOG_INDEX| Constructor and Description |
|---|
MemoryRaftLog(RaftGroupMemberId memberId,
LongSupplier commitIndexSupplier,
RaftProperties properties) |
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 in interface Closeableclose in interface AutoCloseableclose in class 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 in class RaftLogBaseprotected CompletableFuture<Long> purgeImpl(long index)
purgeImpl in class RaftLogBasepublic TermIndex getLastEntryTermIndex()
protected CompletableFuture<Long> appendEntryImpl(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
appendEntryImpl in class RaftLogBasepublic long getStartIndex()
public List<CompletableFuture<Long>> appendImpl(List<org.apache.ratis.proto.RaftProtos.LogEntryProto> logEntryProtos)
appendImpl in class 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–2023 The Apache Software Foundation. All rights reserved.