@ThreadSafe public final class RetryHandlingMetaMasterMasterClient extends AbstractMasterClient
AbstractClient.RpcCallable<V>
mAddress, mChannel, mClosed, mConfAddress, mConnected, mContext, 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.
|
getAddress, getConfAddress
afterDisconnect, beforeConnect, beforeDisconnect, checkVersion, close, connect, disconnect, getRemoteServiceVersion, isClosed, isConnected, 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() throws IOException
AbstractClient
afterConnect
in class AbstractClient
IOException
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.