in elasticjob-infra/elasticjob-registry-center/elasticjob-regitry-center-provider/elasticjob-registry-center-zookeeper-curator/src/main/java/org/apache/shardingsphere/elasticjob/reg/zookeeper/ZookeeperRegistryCenter.java [367:386]
private CuratorOp toCuratorOp(final TransactionOperation each, final TransactionOp transactionOp) {
try {
switch (each.getType()) {
case CHECK_EXISTS:
return transactionOp.check().forPath(each.getKey());
case ADD:
return transactionOp.create().forPath(each.getKey(), each.getValue().getBytes(StandardCharsets.UTF_8));
case UPDATE:
return transactionOp.setData().forPath(each.getKey(), each.getValue().getBytes(StandardCharsets.UTF_8));
case DELETE:
return transactionOp.delete().forPath(each.getKey());
default:
throw new UnsupportedOperationException(each.toString());
}
//CHECKSTYLE:OFF
} catch (final Exception ex) {
//CHECKSTYLE:ON
throw new RegException(ex);
}
}