@NotThreadSafe public final class MetaMasterSync extends Object implements HeartbeatExecutor
RetryHandlingMetaMasterMasterClient
which helps communicate with the leader master.
When running, the standby master will send its heartbeat to the leader master. The leader master
may respond to the heartbeat with a command which will be executed. After which, the task will
wait for the elapsed time since its last heartbeat has reached the heartbeat interval. Then the
cycle will continue.Constructor and Description |
---|
MetaMasterSync(Address masterAddress,
RetryHandlingMetaMasterMasterClient masterClient)
Creates a new instance of
MetaMasterSync . |
Modifier and Type | Method and Description |
---|---|
void |
close()
Cleans up any resources used by the heartbeat executor.
|
void |
heartbeat()
Heartbeats to the leader master node.
|
public MetaMasterSync(Address masterAddress, RetryHandlingMetaMasterMasterClient masterClient)
MetaMasterSync
.masterAddress
- the master addressmasterClient
- the meta master clientpublic void heartbeat()
heartbeat
in interface HeartbeatExecutor
public void close()
HeartbeatExecutor
close
in interface HeartbeatExecutor
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2023. All Rights Reserved.