code: public void setLive(boolean persistent) throws ServiceLocatorException, InterruptedException {
          CreateMode mode = persistent ? CreateMode.PERSISTENT : CreateMode.EPHEMERAL;
          NodePath endpointStatusNodePath = child(LIVE);
          zkBackend.ensurePathExists(endpointStatusNodePath, mode);
  
          // the old expiration time is not valid after re-registering the endpoint
          zkBackend.ensurePathDeleted(child(TIMETOLIVE), false);
      }
docs: Adds a live sub-node to the current endpoint.
  With EPHEMERAL : the node will be destroyed as soon as the current session is closed, meaning when the feature is uninstalled, {@link org.apache.zookeeper.CreateMode.EPHEMERAL}
  With PERSISTENT : the node won't be destroyed until explicitely executed
  
  @param persistent true (CreateMode.PERSISTENT) or false (CreateMode.EPHEMERAL)
  @throws ServiceLocatorException
  @throws InterruptedException