Java 类org.apache.curator.framework.api.PathAndBytesable 实例源码

项目:Baragon    文件:AbstractDataStore.java   
protected <T> void writeToZk(String path, T data) {
  final long start = System.currentTimeMillis();

  try {
    final byte[] serializedInfo = serialize(data);

    final PathAndBytesable<?> builder;

    if (curatorFramework.checkExists().forPath(path) != null) {
      builder = curatorFramework.setData();
    } else {
      builder = curatorFramework.create().creatingParentsIfNeeded();
    }

    builder.forPath(path, serializedInfo);
    log(OperationType.WRITE, Optional.<Integer>absent(), Optional.of(serializedInfo.length), start, path);
  } catch (Exception e) {
    throw Throwables.propagate(e);
  }
}
项目:dcos-commons    文件:CuratorPersisterTest.java   
@Override
public PathAndBytesable<CuratorTransactionBridge> withACL(List<ACL> aclList) {
    throw new UnsupportedOperationException();
}
项目:dcos-commons    文件:CuratorPersisterTest.java   
@Override
public PathAndBytesable<CuratorTransactionBridge> withVersion(int version) {
    throw new UnsupportedOperationException();
}
项目:dcos-commons    文件:CuratorPersisterTest.java   
@Override
public PathAndBytesable<CuratorTransactionBridge> compressed() {
    throw new UnsupportedOperationException();
}
项目:vespa    文件:MockCurator.java   
public PathAndBytesable<T> inBackground() {
    throw new UnsupportedOperationException("Not implemented in MockCurator");
}
项目:vespa    文件:MockCurator.java   
public PathAndBytesable<T> inBackground(Object o) {
    throw new UnsupportedOperationException("Not implemented in MockCurator");
}
项目:vespa    文件:MockCurator.java   
public PathAndBytesable<T> inBackground(BackgroundCallback backgroundCallback) {
    throw new UnsupportedOperationException("Not implemented in MockCurator");
}
项目:vespa    文件:MockCurator.java   
public PathAndBytesable<T> inBackground(BackgroundCallback backgroundCallback, Object o) {
    throw new UnsupportedOperationException("Not implemented in MockCurator");
}
项目:vespa    文件:MockCurator.java   
public PathAndBytesable<T> inBackground(BackgroundCallback backgroundCallback, Executor executor) {
    throw new UnsupportedOperationException("Not implemented in MockCurator");
}
项目:vespa    文件:MockCurator.java   
public PathAndBytesable<T> inBackground(BackgroundCallback backgroundCallback, Object o, Executor executor) {
    throw new UnsupportedOperationException("Not implemented in MockCurator");
}
项目:vespa    文件:MockCurator.java   
@Override
public PathAndBytesable<CuratorTransactionBridge> withACL(List<ACL> list) {
    throw new UnsupportedOperationException("Not implemented in MockCurator");
}
项目:vespa    文件:MockCurator.java   
@Override
public PathAndBytesable<CuratorTransactionBridge> compressed() {
    throw new UnsupportedOperationException("Not implemented in MockCurator");
}
项目:vespa    文件:MockCurator.java   
@Override
public PathAndBytesable<CuratorTransactionBridge> withVersion(int i) {
    throw new UnsupportedOperationException("Not implemented in MockCurator");
}
项目:jstrom    文件:TransactionalState.java   
protected static String forPath(PathAndBytesable<String> builder, 
        String path, byte[] data) throws Exception {
    return (data == null) 
        ? builder.forPath(path) 
        : builder.forPath(path, data);
}
项目:jstrom    文件:TransactionalState.java   
protected static String forPath(PathAndBytesable<String> builder, String path, byte[] data) throws Exception {
    return (data == null) ? builder.forPath(path) : builder.forPath(path, data);
}
项目:jstorm    文件:TransactionalStateZkStorage.java   
protected String forPath(PathAndBytesable<String> builder,
                         String path, byte[] data) throws Exception {
    return (data == null)
            ? builder.forPath(path)
            : builder.forPath(path, data);
}
项目:jstorm    文件:TransactionalState.java   
protected static String forPath(PathAndBytesable<String> builder, String path, byte[] data) throws Exception {
    return (data == null) ? builder.forPath(path) : builder.forPath(path, data);
}