private void innerStop() {
   // also will stop the next ping schedule
   this.retryCount = 0;
   if (masterPinger != null) {
     masterPinger.stop();
     masterPinger = null;
   }
   this.masterNode = null;
 }
  private void innerStart(final DiscoveryNode masterNode) {
    this.masterNode = masterNode;
    this.retryCount = 0;
    this.notifiedMasterFailure.set(false);

    // try and connect to make sure we are connected
    try {
      transportService.connectToNode(masterNode);
    } catch (final Exception e) {
      // notify master failure (which stops also) and bail..
      notifyMasterFailure(masterNode, "failed to perform initial connect [" + e.getMessage() + "]");
      return;
    }
    if (masterPinger != null) {
      masterPinger.stop();
    }
    this.masterPinger = new MasterPinger();
    // start the ping process
    threadPool.schedule(masterPinger, pingInterval);
  }