@ThreadSafe public abstract class AbstractMasterClient extends AbstractClient
AbstractClient.RpcCallable<V>
mChannel, mClosed, mConnected, mContext, mServerAddress, mServiceVersion, mVersionService
Constructor and Description |
---|
AbstractMasterClient(MasterClientContext clientConf)
Creates a new master client base.
|
AbstractMasterClient(MasterClientContext clientConf,
java.util.function.Supplier<RetryPolicy> retryPolicySupplier)
Creates a new master client base.
|
Modifier and Type | Method and Description |
---|---|
protected GrpcServerAddress |
queryGrpcServerAddress()
AbstractClient works with Grpc Servers. |
afterConnect, afterDisconnect, beforeConnect, beforeDisconnect, checkVersion, close, connect, disconnect, getConfAddress, getRemoteHostName, getRemoteServiceType, getRemoteServiceVersion, getRemoteSockAddress, getServiceName, getServiceVersion, isClosed, isConnected, retryRPC, retryRPC
public AbstractMasterClient(MasterClientContext clientConf)
clientConf
- master client configurationpublic AbstractMasterClient(MasterClientContext clientConf, java.util.function.Supplier<RetryPolicy> retryPolicySupplier)
clientConf
- master client configurationretryPolicySupplier
- retry policy to useprotected GrpcServerAddress queryGrpcServerAddress() throws UnavailableException
AbstractClient
AbstractClient
works with Grpc Servers.
Child classes should only override this method to query the address
of the grpc server they talk to. The conversion from GrpcServerAddress
to more generic SocketAddress
required by Client.getRemoteSockAddress()
is handled by this class.queryGrpcServerAddress
in class AbstractClient
GrpcServerAddress
of the remote serverUnavailableException
- if address can't be determinedCopyright © 2023. All Rights Reserved.