public class RaftServerImpl extends Object implements RaftServerProtocol, RaftServerAsynchronousProtocol, RaftClientProtocol, RaftClientAsynchronousProtocol
RaftServerProtocol.Op| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOG |
public StateMachine getStateMachine()
public RetryCache getRetryCache()
public RaftServerProxy getProxy()
public RaftServerRpc getServerRpc()
public ServerState getState()
public RaftGroupMemberId getMemberId()
public RaftPeerId getId()
public void shutdown(boolean deleteDirectory)
public boolean isAlive()
public boolean isFollower()
public boolean isCandidate()
public boolean isLeader()
public org.apache.ratis.server.impl.CommitInfoCache getCommitInfoCache()
public org.apache.ratis.proto.RaftProtos.RoleInfoProto getRoleInfoProto()
public boolean isLeaderReady()
public CompletableFuture<RaftClientReply> submitClientRequestAsync(RaftClientRequest request) throws IOException
submitClientRequestAsync in interface RaftClientAsynchronousProtocolIOExceptionpublic RaftClientReply submitClientRequest(RaftClientRequest request) throws IOException
submitClientRequest in interface RaftClientProtocolIOExceptionpublic RaftClientReply setConfiguration(SetConfigurationRequest request) throws IOException
setConfiguration in interface RaftClientProtocolIOExceptionpublic CompletableFuture<RaftClientReply> setConfigurationAsync(SetConfigurationRequest request) throws IOException
setConfigurationAsync in interface RaftClientAsynchronousProtocolIOExceptionpublic org.apache.ratis.proto.RaftProtos.RequestVoteReplyProto requestVote(org.apache.ratis.proto.RaftProtos.RequestVoteRequestProto r) throws IOException
requestVote in interface RaftServerProtocolIOExceptionpublic org.apache.ratis.proto.RaftProtos.AppendEntriesReplyProto appendEntries(org.apache.ratis.proto.RaftProtos.AppendEntriesRequestProto r) throws IOException
appendEntries in interface RaftServerProtocolIOExceptionpublic CompletableFuture<org.apache.ratis.proto.RaftProtos.AppendEntriesReplyProto> appendEntriesAsync(org.apache.ratis.proto.RaftProtos.AppendEntriesRequestProto r) throws IOException
appendEntriesAsync in interface RaftServerAsynchronousProtocolIOExceptionpublic org.apache.ratis.proto.RaftProtos.InstallSnapshotReplyProto installSnapshot(org.apache.ratis.proto.RaftProtos.InstallSnapshotRequestProto request) throws IOException
installSnapshot in interface RaftServerProtocolIOExceptionpublic void submitUpdateCommitEvent()
public long[] getFollowerNextIndices()
public void notifyTruncatedLogEntry(org.apache.ratis.proto.RaftProtos.LogEntryProto logEntry)
logEntry - the log entry being truncatedpublic LeaderElectionMetrics getLeaderElectionMetrics()
public RaftServerMetrics getRaftServerMetrics()
Copyright © 2017–2020 The Apache Software Foundation. All rights reserved.