gpt4 book ai didi

org.I0Itec.zkclient.ZkClient.createPersistentSequential()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 12:50:40 27 4
gpt4 key购买 nike

本文整理了Java中org.I0Itec.zkclient.ZkClient.createPersistentSequential()方法的一些代码示例,展示了ZkClient.createPersistentSequential()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZkClient.createPersistentSequential()方法的具体详情如下:
包路径:org.I0Itec.zkclient.ZkClient
类名称:ZkClient
方法名:createPersistentSequential

ZkClient.createPersistentSequential介绍

暂无

代码示例

代码示例来源:origin: ltsopensource/light-task-scheduler

protected String createPersistent(String path, boolean sequential) {
  try {
    if (sequential) {
      return zkClient.createPersistentSequential(path, true);
    } else {
      zkClient.createPersistent(path, true);
      return path;
    }
  } catch (ZkNodeExistsException ignored) {
  }
  return null;
}

代码示例来源:origin: ltsopensource/light-task-scheduler

protected String createPersistent(String path, Object data, boolean sequential) {
  try {
    if (sequential) {
      return zkClient.createPersistentSequential(path, data);
    } else {
      zkClient.createPersistent(path, data);
      return path;
    }
  } catch (ZkNodeExistsException ignored) {
  }
  return null;
}

代码示例来源:origin: ltsopensource/light-task-scheduler

protected String createPersistent(String path, Object data, boolean sequential) {
  try {
    if (sequential) {
      return zkClient.createPersistentSequential(path, data);
    } else {
      zkClient.createPersistent(path, data);
      return path;
    }
  } catch (ZkNodeExistsException ignored) {
  }
  return null;
}

代码示例来源:origin: ltsopensource/light-task-scheduler

protected String createPersistent(String path, boolean sequential) {
  try {
    if (sequential) {
      return zkClient.createPersistentSequential(path, true);
    } else {
      zkClient.createPersistent(path, true);
      return path;
    }
  } catch (ZkNodeExistsException ignored) {
  }
  return null;
}

代码示例来源:origin: apache/samza

@Override
 public void countDown() {
  // create persistent node
  String path = zkUtils.getZkClient().createPersistentSequential(latchPath + "/", participantId);
  LOG.debug("ZKProcessorLatch countDown created " + path);
 }
}

代码示例来源:origin: com.github.sgroschupf/zkclient

public boolean offer(T element) {
  try {
    _zkClient.createPersistentSequential(_root + "/" + ELEMENT_NAME + "-", element);
  } catch (Exception e) {
    throw ExceptionUtil.convertToRuntimeException(e);
  }
  return true;
}

代码示例来源:origin: com.101tec/zkclient

public boolean offer(T element) {
  try {
    _zkClient.createPersistentSequential(_root + "/" + ELEMENT_NAME + "-", element);
  } catch (Exception e) {
    throw ExceptionUtil.convertToRuntimeException(e);
  }
  return true;
}

代码示例来源:origin: org.apache.samza/samza-core

@Override
 public void countDown() {
  // create persistent node
  String path = zkUtils.getZkClient().createPersistentSequential(latchPath + "/", participantId);
  LOG.debug("ZKProcessorLatch countDown created " + path);
 }
}

代码示例来源:origin: org.apache.samza/samza-core_2.10

@Override
 public void countDown() {
  // create persistent node
  String path = zkUtils.getZkClient().createPersistentSequential(latchPath + "/", participantId);
  LOG.debug("ZKProcessorLatch countDown created " + path);
 }
}

代码示例来源:origin: org.apache.samza/samza-core_2.12

@Override
 public void countDown() {
  // create persistent node
  String path = zkUtils.getZkClient().createPersistentSequential(latchPath + "/", participantId);
  LOG.debug("ZKProcessorLatch countDown created " + path);
 }
}

代码示例来源:origin: org.apache.samza/samza-core_2.11

@Override
 public void countDown() {
  // create persistent node
  String path = zkUtils.getZkClient().createPersistentSequential(latchPath + "/", participantId);
  LOG.debug("ZKProcessorLatch countDown created " + path);
 }
}

代码示例来源:origin: com.github.ltsopensource/lts-core

protected String createPersistent(String path, boolean sequential) {
  try {
    if (sequential) {
      return zkClient.createPersistentSequential(path, true);
    } else {
      zkClient.createPersistent(path, true);
      return path;
    }
  } catch (ZkNodeExistsException ignored) {
  }
  return null;
}

代码示例来源:origin: com.github.ltsopensource/lts-core

protected String createPersistent(String path, Object data, boolean sequential) {
  try {
    if (sequential) {
      return zkClient.createPersistentSequential(path, data);
    } else {
      zkClient.createPersistent(path, data);
      return path;
    }
  } catch (ZkNodeExistsException ignored) {
  }
  return null;
}

代码示例来源:origin: strimzi/strimzi-kafka-operator

/**
 * This notifies Kafka about the changes we have made
 *
 * @param username  Name of the user whose configuration changed
 */
private void notifyChanges(String username) {
  log.debug("Notifying changes for user {}", username);
  ensurePath("/config/changes");
  JsonObject json = new JsonObject().put("version", 2).put("entity_path", "users/" + username);
  zkClient.createPersistentSequential("/config/changes/config_change_", json.encode().getBytes(Charset.defaultCharset()));
}

代码示例来源:origin: com.typesafe.akka/akka-zookeeper-mailbox

public String enqueue(T element) {
 try {
  String sequential = _zkClient.createPersistentSequential(getElementRoughPath(), element);
  String elementId = sequential.substring(sequential.lastIndexOf('/') + 1);
  return elementId;
 } catch (Exception e) {
  throw ExceptionUtil.convertToRuntimeException(e);
 }
}

代码示例来源:origin: appleappleapple/DistributeLearning

/**
 * ṩ
 * @param element
 * @return
 * @throws Exception
 */
public boolean offer(T element) throws Exception{
  
  //ݽڵ·
  String nodeFullPath = root .concat( "/" ).concat( Node_NAME );
  try {
    //־õĽڵ㣬д
    zkClient.createPersistentSequential(nodeFullPath , element);
  }catch (ZkNoNodeException e) {
    zkClient.createPersistent(root);
    offer(element);
  } catch (Exception e) {
    throw ExceptionUtil.convertToRuntimeException(e);
  }
  return true;
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com