@ThreadSafe public abstract class AbstractMasterClient extends AbstractClient
AbstractClient.RpcCallable<V>
mAddress, mChannel, mClosed, mConnected, mContext, mServiceVersion, mVersionService
Constructor and Description |
---|
AbstractMasterClient(MasterClientContext clientConf)
Creates a new master client base.
|
AbstractMasterClient(MasterClientContext clientConf,
InetSocketAddress address,
java.util.function.Supplier<RetryPolicy> retryPolicySupplier)
Creates a new master client base.
|
Modifier and Type | Method and Description |
---|---|
InetSocketAddress |
getAddress() |
InetSocketAddress |
getConfAddress() |
afterConnect, afterDisconnect, beforeConnect, beforeDisconnect, checkVersion, close, connect, disconnect, getRemoteServiceType, getRemoteServiceVersion, getServiceName, getServiceVersion, isClosed, isConnected, retryRPC, retryRPC
public AbstractMasterClient(MasterClientContext clientConf)
clientConf
- master client configurationpublic AbstractMasterClient(MasterClientContext clientConf, InetSocketAddress address, java.util.function.Supplier<RetryPolicy> retryPolicySupplier)
clientConf
- master client configurationaddress
- address to connect toretryPolicySupplier
- retry policy to usepublic InetSocketAddress getAddress() throws UnavailableException
getAddress
in interface Client
getAddress
in class AbstractClient
InetSocketAddress
of the remoteUnavailableException
- if the primary address cannot be determinedpublic InetSocketAddress getConfAddress() throws UnavailableException
getConfAddress
in interface Client
getConfAddress
in class AbstractClient
InetSocketAddress
of the configuration remoteUnavailableException
- if the primary address cannot be determinedCopyright © 2023. All Rights Reserved.