public abstract class RaftServerRpcWithProxy<PROXY extends Closeable,PROXIES extends PeerProxyMap<PROXY>> extends Object implements RaftServerRpc
RaftServerRpc using a PeerProxyMap.RaftServerRpc.Builder<B extends RaftServerRpc.Builder,RPC extends RaftServerRpc>RaftServerProtocol.Op| Constructor and Description |
|---|
RaftServerRpcWithProxy(Supplier<RaftPeerId> idSupplier,
Function<RaftPeerId,PROXIES> proxyCreater) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPeers(Iterable<RaftPeer> peers)
add information of the given peers
|
void |
close() |
void |
closeImpl() |
RaftPeerId |
getId() |
LifeCycle |
getLifeCycle() |
PROXIES |
getProxies() |
void |
handleException(RaftPeerId serverId,
Exception e,
boolean reconnect)
Handle the given exception.
|
void |
start()
Start the RPC service.
|
abstract void |
startImpl() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInetSocketAddress, notifyNotLeaderappendEntries, installSnapshot, requestVotegetRpcTypepublic RaftServerRpcWithProxy(Supplier<RaftPeerId> idSupplier, Function<RaftPeerId,PROXIES> proxyCreater)
public RaftPeerId getId()
public LifeCycle getLifeCycle()
public PROXIES getProxies()
public void addPeers(Iterable<RaftPeer> peers)
RaftServerRpcaddPeers in interface RaftServerRpcpublic void handleException(RaftPeerId serverId, Exception e, boolean reconnect)
RaftServerRpchandleException in interface RaftServerRpcpublic final void start()
throws IOException
RaftServerRpcstart in interface RaftServerRpcIOExceptionpublic abstract void startImpl()
throws IOException
IOExceptionpublic final void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void closeImpl()
throws IOException
IOExceptionCopyright © 2017–2020 The Apache Software Foundation. All rights reserved.