public abstract class LogAppenderBase extends Object implements LogAppender
LogAppender.DEFAULT_CLASS, LOG| Modifier | Constructor and Description |
|---|---|
protected |
LogAppenderBase(RaftServer.Division server,
LeaderState leaderState,
FollowerInfo f) |
| Modifier and Type | Method and Description |
|---|---|
FollowerInfo |
getFollower() |
LeaderState |
getLeaderState() |
RaftServer.Division |
getServer() |
boolean |
isRunning() |
org.apache.ratis.proto.RaftProtos.AppendEntriesRequestProto |
newAppendEntriesRequest(long callId,
boolean heartbeat) |
org.apache.ratis.proto.RaftProtos.InstallSnapshotRequestProto |
newInstallSnapshotNotificationRequest(TermIndex firstAvailableLogTermIndex) |
Iterable<org.apache.ratis.proto.RaftProtos.InstallSnapshotRequestProto> |
newInstallSnapshotRequests(String requestId,
SnapshotInfo snapshot) |
void |
start() |
void |
stop() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFollowerId, getHeartbeatRemainingTimeMs, getRaftLog, getServerRpc, hasAppendEntries, newLogAppenderDefault, notifyLogAppender, onFollowerTerm, run, shouldHeartbeat, shouldInstallSnapshot, shouldSendAppendEntriesprotected LogAppenderBase(RaftServer.Division server, LeaderState leaderState, FollowerInfo f)
public final RaftServer.Division getServer()
getServer in interface LogAppenderpublic void start()
start in interface LogAppenderpublic boolean isRunning()
isRunning in interface LogAppenderpublic void stop()
stop in interface LogAppenderpublic final FollowerInfo getFollower()
getFollower in interface LogAppenderpublic final LeaderState getLeaderState()
getLeaderState in interface LogAppenderpublic org.apache.ratis.proto.RaftProtos.AppendEntriesRequestProto newAppendEntriesRequest(long callId, boolean heartbeat) throws RaftLogIOException
newAppendEntriesRequest in interface LogAppenderRaftLogIOExceptionpublic org.apache.ratis.proto.RaftProtos.InstallSnapshotRequestProto newInstallSnapshotNotificationRequest(TermIndex firstAvailableLogTermIndex)
newInstallSnapshotNotificationRequest in interface LogAppenderpublic Iterable<org.apache.ratis.proto.RaftProtos.InstallSnapshotRequestProto> newInstallSnapshotRequests(String requestId, SnapshotInfo snapshot)
newInstallSnapshotRequests in interface LogAppenderCopyright © 2017–2021 The Apache Software Foundation. All rights reserved.