distributed-v2/src/main/java/com/orientechnologies/orient/distributed/impl/ONodeManager.java
private void initCheckLeader() {
    checkerTimer = new TimerTask() {
      @Override
      public void run() {
        try {
          if (running) {
            checkLeader();
            initCheckLeader();
          }
        } catch (Exception e) {
          e.printStackTrace();
        }
      }
    };
    taskScheduler.scheduleOnce(checkerTimer, checkLeaderIntervalMillis);
  }
private void initCheckLeader() {
    checkerTimer = new TimerTask() {
      @Override
      public void run() {
        try {
          if (running) {
            checkLeader();
            initCheckLeader();
          }
        } catch (Exception e) {
          e.printStackTrace();
        }
      }
    };
    taskScheduler.scheduleOnce(checkerTimer, checkLeaderIntervalMillis);
  }
private void initCheckLeader ( ) { checkerTimer = new TimerTask ( ) { @ Override public void run ( ) { try { if ( running ) { checkLeader ( ) ; initCheckLeader ( ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; } } } ; taskScheduler . scheduleOnce ( checkerTimer , checkLeaderIntervalMillis ) ; }
init the procedure that sends pings to other servers, ie. that notifies that you are alive
init the procedure that sends pings to other servers ie . that notifies that you are alive