zkBackend.ensurePathDeleted(this, true);
}
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);
}