@ThreadSafe public final class RetryHandlingMetaMasterMasterClient extends AbstractMasterClient
AbstractClient.RpcCallable<V>
mChannel, mClosed, mConnected, mContext, mServerAddress, mServiceVersion, mVersionService
Constructor and Description |
---|
RetryHandlingMetaMasterMasterClient(MasterClientContext conf)
Creates a instance of
RetryHandlingMetaMasterMasterClient . |
Modifier and Type | Method and Description |
---|---|
protected void |
afterConnect()
This method is called after the connection is made to the remote.
|
long |
getId(Address address)
Returns a master id for a master address.
|
protected ServiceType |
getRemoteServiceType() |
protected String |
getServiceName() |
protected long |
getServiceVersion() |
MetaCommand |
heartbeat(long masterId)
Sends a heartbeat to the leader master.
|
void |
register(long masterId,
List<ConfigProperty> configList)
Registers with the leader master.
|
afterDisconnect, beforeConnect, getConfAddress, queryGrpcServerAddress
beforeDisconnect, checkVersion, close, connect, connectWithRuntimeException, disconnect, getRemoteHostName, getRemoteServiceVersion, getRemoteSockAddress, isClosed, isConnected, retryRPC, retryRPC
public RetryHandlingMetaMasterMasterClient(MasterClientContext conf)
RetryHandlingMetaMasterMasterClient
.conf
- master client configurationprotected ServiceType getRemoteServiceType()
getRemoteServiceType
in class AbstractClient
protected String getServiceName()
getServiceName
in class AbstractClient
protected long getServiceVersion()
getServiceVersion
in class AbstractClient
protected void afterConnect()
AbstractClient
afterConnect
in class AbstractClient
public long getId(Address address) throws IOException
address
- the address to get a master id forIOException
public MetaCommand heartbeat(long masterId) throws IOException
masterId
- the master idIOException
public void register(long masterId, List<ConfigProperty> configList) throws IOException
masterId
- the master id of the standby master registeringconfigList
- the configuration of this masterIOException
Copyright © 2023. All Rights Reserved.