private void startAppendTimer() {
    // Set a timer that will be used to periodically synchronize with other nodes
    // in the cluster. This timer acts as a heartbeat to ensure this node remains
    // the leader.
    LOGGER.trace("{} - Starting append timer", context.getCluster().member().address());
    appendTimer = context.getThreadContext().schedule(Duration.ZERO, context.getHeartbeatInterval(), this::appendMembers);
  }
private void startAppendTimer ( ) { LOGGER . trace ( "{} - Starting append timer" , context . getCluster ( ) . member ( ) . address ( ) ) ; appendTimer = context . getThreadContext ( ) . schedule ( Duration . ZERO , context . getHeartbeatInterval ( ) , this :: appendMembers ) ; }
Starts sending AppendEntries requests to all cluster members.