@NotThreadSafe public final class MetaMasterSync extends java.lang.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() |
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 HeartbeatExecutorpublic void close()
close in interface HeartbeatExecutorclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableCopyright © 2019. All Rights Reserved.