public abstract class RaftServerRpcWithProxy<PROXY extends Closeable,PROXIES extends PeerProxyMap<PROXY>> extends Object implements RaftServerRpc
RaftServerRpc using a PeerProxyMap.RaftServerProtocol.Op| 限定符 | 构造器和说明 |
|---|---|
protected |
RaftServerRpcWithProxy(Supplier<RaftPeerId> idSupplier,
Function<RaftPeerId,PROXIES> proxyCreater) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addRaftPeers(Collection<RaftPeer> peers) |
void |
close() |
void |
closeImpl()
Implementation of the
close() method. |
RaftPeerId |
getId() |
PROXIES |
getProxies() |
void |
handleException(RaftPeerId serverId,
Exception e,
boolean reconnect)
Handle the given exception.
|
void |
start()
Start the RPC service.
|
protected abstract void |
startImpl()
Implementation of the
start() method. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasync, getAdminServerAddress, getClientServerAddress, notifyNotLeaderappendEntries, installSnapshot, requestVote, startLeaderElectiongetInetSocketAddressgetRpcTypeaddRaftPeersprotected RaftServerRpcWithProxy(Supplier<RaftPeerId> idSupplier, Function<RaftPeerId,PROXIES> proxyCreater)
public RaftPeerId getId()
public PROXIES getProxies()
PeerProxyMap.public void addRaftPeers(Collection<RaftPeer> peers)
addRaftPeers 在接口中 RaftPeer.Addpublic void handleException(RaftPeerId serverId, Exception e, boolean reconnect)
RaftServerRpchandleException 在接口中 RaftServerRpcpublic final void start()
throws IOException
ServerRpcstart 在接口中 ServerRpcIOExceptionprotected abstract void startImpl()
throws IOException
start() method.IOExceptionpublic final void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionpublic void closeImpl()
throws IOException
close() method.IOExceptionCopyright © 2017–2025 The Apache Software Foundation. All rights reserved.