gpt4 book ai didi

com.spotify.helios.servicescommon.coordination.ZooKeeperClient.transaction()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 04:07:31 25 4
gpt4 key购买 nike

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

ZooKeeperClient.transaction介绍

暂无

代码示例

代码示例来源:origin: spotify/helios

@Override
public Collection<CuratorTransactionResult> transaction(ZooKeeperOperation... operations)
  throws KeeperException {
 return reporter.time(tag, "transaction", () -> client.transaction(operations));
}

代码示例来源:origin: spotify/helios

@Override
public Collection<CuratorTransactionResult> transaction(List<ZooKeeperOperation> operations)
  throws KeeperException {
 return reporter.time(tag, "transaction", () -> client.transaction(operations));
}

代码示例来源:origin: spotify/helios

client.transaction(ops);
 emitEvents(deploymentGroupEventTopic, op.events());
} catch (BadVersionException e) {

代码示例来源:origin: spotify/helios

operations.add(create(Paths.configHostId(host), hostId.getBytes(UTF_8)));
 client.transaction(operations);
} catch (NoNodeException e) {
 throw new HostNotFoundException(host);

代码示例来源:origin: spotify/helios

client.transaction(delete(nodes));

代码示例来源:origin: spotify/helios

client.transaction(operations.build());
} catch (final NoNodeException e) {
 throw new JobDoesNotExistException(id);

代码示例来源:origin: spotify/helios

client.transaction(operations);
} catch (NoNodeException e) {
 throw new HostNotFoundException(host);

代码示例来源:origin: spotify/helios

client.transaction(operations);
} catch (final NoNodeException e) {

代码示例来源:origin: spotify/helios

client.transaction(operations);
} catch (final NoNodeException e) {
 throw new DeploymentGroupDoesNotExistException(name);

代码示例来源:origin: spotify/helios

deploymentGroup.getName(), jobId, operations);
client.transaction(operations);

代码示例来源:origin: spotify/helios

try {
 client.ensurePath(Paths.historyJob(id));
 client.transaction(create(Paths.configJob(id), job),
   create(Paths.configJobRefShort(id), id),
   create(Paths.configJobHosts(id)),

代码示例来源:origin: spotify/helios

groupName, deploymentGroup.getJobId(), ops);
 client.transaction(ops);
 emitEvents(deploymentGroupEventTopic, events);
} catch (BadVersionException e) {

代码示例来源:origin: spotify/helios

client.ensurePath(Paths.configDeploymentGroups());
client.ensurePath(Paths.statusDeploymentGroups());
client.transaction(
  create(Paths.configDeploymentGroup(deploymentGroup.getName()), deploymentGroup),
  create(Paths.statusDeploymentGroup(deploymentGroup.getName())),

代码示例来源:origin: spotify/helios

client.transaction(operations);
 log.info("deployed {}: {} (retry={})", deployment, host, count);
} catch (NoNodeException e) {

代码示例来源:origin: at.molindo/helios-services

@Override
public Collection<CuratorTransactionResult> transaction(ZooKeeperOperation... operations)
  throws KeeperException {
 try {
  return client.transaction(operations);
 } catch (KeeperException e) {
  reporter.checkException(e, tag, "transaction");
  throw e;
 }
}

代码示例来源:origin: at.molindo/helios-services

@Override
public Collection<CuratorTransactionResult> transaction(List<ZooKeeperOperation> operations)
  throws KeeperException {
 try {
  return client.transaction(operations);
 } catch (KeeperException e) {
  reporter.checkException(e, tag, "transaction");
  throw e;
 }
}

代码示例来源:origin: at.molindo/helios-services

client.transaction(delete(nodes));

代码示例来源:origin: at.molindo/helios-services

@Override
public void stopDeploymentGroup(final String deploymentGroupName)
  throws DeploymentGroupDoesNotExistException {
 checkNotNull(deploymentGroupName, "name");
 log.info("stop deployment-group: name={}", deploymentGroupName);
 final ZooKeeperClient client = provider.get("stopDeploymentGroup");
 final DeploymentGroup deploymentGroup = getDeploymentGroup(deploymentGroupName);
 final String statusPath = Paths.statusDeploymentGroup(deploymentGroupName);
 final DeploymentGroupStatus status = DeploymentGroupStatus.newBuilder()
   .setDeploymentGroup(deploymentGroup)
   .setState(FAILED)
   .setError("Stopped by user")
   .build();
 try {
  client.ensurePath(statusPath);
  client.transaction(set(statusPath, status));
 } catch (final NoNodeException e) {
  throw new DeploymentGroupDoesNotExistException(deploymentGroupName);
 } catch (final KeeperException e) {
  throw new HeliosRuntimeException(
    "stop deployment-group " + deploymentGroupName + " failed", e);
 }
}

代码示例来源:origin: at.molindo/helios-services

try {
 client.ensurePath(Paths.historyJob(id));
 client.transaction(create(Paths.configJob(id), job),
           create(Paths.configJobRefShort(id), id),
           create(Paths.configJobHosts(id)),

代码示例来源:origin: at.molindo/helios-services

@Override
public void addDeploymentGroup(final DeploymentGroup deploymentGroup)
  throws DeploymentGroupExistsException {
 log.info("adding deployment-group: {}", deploymentGroup);
 final ZooKeeperClient client = provider.get("addDeploymentGroup");
 try {
  try {
   client.ensurePath(Paths.configDeploymentGroups());
   client.ensurePath(Paths.statusDeploymentGroups());
   client.transaction(
     create(Paths.configDeploymentGroup(deploymentGroup.getName()), deploymentGroup),
     create(Paths.statusDeploymentGroup(deploymentGroup.getName())),
     create(Paths.statusDeploymentGroupHosts(deploymentGroup.getName()))
    );
  } catch (final NodeExistsException e) {
   throw new DeploymentGroupExistsException(deploymentGroup.getName());
  }
 } catch (final KeeperException e) {
  throw new HeliosRuntimeException("adding deployment-group " + deploymentGroup + " failed", e);
 }
}

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