private CuratorOp internalForPath(String path, byte[] data, boolean useData) { TransactionCreateBuilder2<CuratorOp> builder1 = (ttl > 0) ? client.transactionOp().create().withTtl(ttl) : client.transactionOp().create(); ACLPathAndBytesable<CuratorOp> builder2 = compressed ? builder1.compressed().withMode(createMode) : builder1.withMode(createMode); PathAndBytesable<CuratorOp> builder3 = builder2.withACL(aclList); try { return useData ? builder3.forPath(path, data) : builder3.forPath(path); } catch ( Exception e ) { throw new RuntimeException(e); // should never happen } } };