}
}
protected SingularityCreateResult set(String path, Optional<byte[]> data) {
try {
SetDataBuilder setDataBuilder = curator.setData();
if (data.isPresent()) {
setDataBuilder.forPath(path, data.get());
} else {
setDataBuilder.forPath(path);
}
return SingularityCreateResult.EXISTED;
} catch (NoNodeException nne) {
return save(path, data);