java/openmldb-taskmanager/src/main/java/com/_4paradigm/openmldb/taskmanager/zk/FailoverWatcher.java
@Override
  public void process(WatchedEvent event) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Received ZooKeeper Event, " + "type=" + event.getType() + ", " + "state="
          + event.getState() + ", " + "path=" + event.getPath());
    }

    switch (event.getType()) {
    case None: {
      processConnection(event);
      break;
    }
    case NodeCreated: {
      processNodeCreated(event.getPath());
      break;
    }
    case NodeDeleted: {
      processNodeDeleted(event.getPath());
      break;
    }
    case NodeDataChanged: {
      processDataChanged(event.getPath());
      break;
    }
    case NodeChildrenChanged: {
      processNodeChildrenChanged(event.getPath());
      break;
    }
    default:
      break;
    }
  }
/**
   * Override this mothod to deal with events for leader election.
   *
   * @param event the ZooKeeper event
   */
Override this mothod to deal with events for leader election.
@param event the ZooKeeper event
Override this mothod to deal with events for leader election . @param event the ZooKeeper event
@Override
  public void process(WatchedEvent event) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Received ZooKeeper Event, " + "type=" + event.getType() + ", " + "state="
          + event.getState() + ", " + "path=" + event.getPath());
    }
    switch (event.getType()) {
    case None: {
      processConnection(event);
      break;
    }
    case NodeCreated: {
      processNodeCreated(event.getPath());
      break;
    }
    case NodeDeleted: {
      processNodeDeleted(event.getPath());
      break;
    }
    case NodeDataChanged: {
      processDataChanged(event.getPath());
      break;
    }
    case NodeChildrenChanged: {
      processNodeChildrenChanged(event.getPath());
      break;
    }
    default:
      break;
    }
  }
@ Override public void process ( WatchedEvent event ) { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Received ZooKeeper Event, " + "type=" + event . getType ( ) + ", " + "state=" + event . getState ( ) + ", " + "path=" + event . getPath ( ) ) ; } switch ( event . getType ( ) ) { case None : { processConnection ( event ) ; break ; } case NodeCreated : { processNodeCreated ( event . getPath ( ) ) ; break ; } case NodeDeleted : { processNodeDeleted ( event . getPath ( ) ) ; break ; } case NodeDataChanged : { processDataChanged ( event . getPath ( ) ) ; break ; } case NodeChildrenChanged : { processNodeChildrenChanged ( event . getPath ( ) ) ; break ; } default : break ; } }
Override this mothod to deal with events for leader election.
Override this mothod to deal with events for leader election .