Java 类org.apache.hadoop.hbase.protobuf.generated.ClusterIdProtos 实例源码

项目:ditb    文件:ClusterId.java   
/**
 * @param bytes A pb serialized {@link ClusterId} instance with pb magic prefix
 * @return An instance of {@link ClusterId} made from <code>bytes</code>
 * @throws DeserializationException
 * @see #toByteArray()
 */
public static ClusterId parseFrom(final byte [] bytes) throws DeserializationException {
  if (ProtobufUtil.isPBMagicPrefix(bytes)) {
    int pblen = ProtobufUtil.lengthOfPBMagic();
    ClusterIdProtos.ClusterId.Builder builder = ClusterIdProtos.ClusterId.newBuilder();
    ClusterIdProtos.ClusterId cid = null;
    try {
      ProtobufUtil.mergeFrom(builder, bytes, pblen, bytes.length - pblen);
      cid = builder.build();
    } catch (IOException e) {
      throw new DeserializationException(e);
    }
    return convert(cid);
  } else {
    // Presume it was written out this way, the old way.
    return new ClusterId(Bytes.toString(bytes));
  }
}
项目:pbase    文件:ClusterId.java   
/**
 * @param bytes A pb serialized {@link ClusterId} instance with pb magic prefix
 * @return An instance of {@link ClusterId} made from <code>bytes</code>
 * @throws DeserializationException
 * @see #toByteArray()
 */
public static ClusterId parseFrom(final byte [] bytes) throws DeserializationException {
  if (ProtobufUtil.isPBMagicPrefix(bytes)) {
    int pblen = ProtobufUtil.lengthOfPBMagic();
    ClusterIdProtos.ClusterId.Builder builder = ClusterIdProtos.ClusterId.newBuilder();
    ClusterIdProtos.ClusterId cid = null;
    try {
      cid = builder.mergeFrom(bytes, pblen, bytes.length - pblen).build();
    } catch (InvalidProtocolBufferException e) {
      throw new DeserializationException(e);
    }
    return convert(cid);
  } else {
    // Presume it was written out this way, the old way.
    return new ClusterId(Bytes.toString(bytes));
  }
}
项目:HIndex    文件:ClusterId.java   
/**
 * @param bytes A pb serialized {@link ClusterId} instance with pb magic prefix
 * @return An instance of {@link ClusterId} made from <code>bytes</code>
 * @throws DeserializationException
 * @see #toByteArray()
 */
public static ClusterId parseFrom(final byte [] bytes) throws DeserializationException {
  if (ProtobufUtil.isPBMagicPrefix(bytes)) {
    int pblen = ProtobufUtil.lengthOfPBMagic();
    ClusterIdProtos.ClusterId.Builder builder = ClusterIdProtos.ClusterId.newBuilder();
    ClusterIdProtos.ClusterId cid = null;
    try {
      cid = builder.mergeFrom(bytes, pblen, bytes.length - pblen).build();
    } catch (InvalidProtocolBufferException e) {
      throw new DeserializationException(e);
    }
    return convert(cid);
  } else {
    // Presume it was written out this way, the old way.
    return new ClusterId(Bytes.toString(bytes));
  }
}
项目:PyroDB    文件:ClusterId.java   
/**
 * @param bytes A pb serialized {@link ClusterId} instance with pb magic prefix
 * @return An instance of {@link ClusterId} made from <code>bytes</code>
 * @throws DeserializationException
 * @see #toByteArray()
 */
public static ClusterId parseFrom(final byte [] bytes) throws DeserializationException {
  if (ProtobufUtil.isPBMagicPrefix(bytes)) {
    int pblen = ProtobufUtil.lengthOfPBMagic();
    ClusterIdProtos.ClusterId.Builder builder = ClusterIdProtos.ClusterId.newBuilder();
    ClusterIdProtos.ClusterId cid = null;
    try {
      cid = builder.mergeFrom(bytes, pblen, bytes.length - pblen).build();
    } catch (InvalidProtocolBufferException e) {
      throw new DeserializationException(e);
    }
    return convert(cid);
  } else {
    // Presume it was written out this way, the old way.
    return new ClusterId(Bytes.toString(bytes));
  }
}
项目:c5    文件:ClusterId.java   
/**
 * @param bytes A pb serialized {@link ClusterId} instance with pb magic prefix
 * @return An instance of {@link ClusterId} made from <code>bytes</code>
 * @throws DeserializationException
 * @see #toByteArray()
 */
public static ClusterId parseFrom(final byte [] bytes) throws DeserializationException {
  if (ProtobufUtil.isPBMagicPrefix(bytes)) {
    int pblen = ProtobufUtil.lengthOfPBMagic();
    ClusterIdProtos.ClusterId.Builder builder = ClusterIdProtos.ClusterId.newBuilder();
    ClusterIdProtos.ClusterId cid = null;
    try {
      cid = builder.mergeFrom(bytes, pblen, bytes.length - pblen).build();
    } catch (InvalidProtocolBufferException e) {
      throw new DeserializationException(e);
    }
    return convert(cid);
  } else {
    // Presume it was written out this way, the old way.
    return new ClusterId(Bytes.toString(bytes));
  }
}
项目:DominoHBase    文件:ClusterId.java   
/**
 * @param bytes A pb serialized {@link ClusterId} instance with pb magic prefix
 * @return An instance of {@link ClusterId} made from <code>bytes</code>
 * @throws DeserializationException
 * @see #toByteArray()
 */
public static ClusterId parseFrom(final byte [] bytes) throws DeserializationException {
  if (ProtobufUtil.isPBMagicPrefix(bytes)) {
    int pblen = ProtobufUtil.lengthOfPBMagic();
    ClusterIdProtos.ClusterId.Builder builder = ClusterIdProtos.ClusterId.newBuilder();
    ClusterIdProtos.ClusterId cid = null;
    try {
      cid = builder.mergeFrom(bytes, pblen, bytes.length - pblen).build();
    } catch (InvalidProtocolBufferException e) {
      throw new DeserializationException(e);
    }
    return convert(cid);
  } else {
    // Presume it was written out this way, the old way.
    return new ClusterId(Bytes.toString(bytes));
  }
}
项目:ditb    文件:ClusterId.java   
/**
 * @return A pb instance to represent this instance.
 */
ClusterIdProtos.ClusterId convert() {
  ClusterIdProtos.ClusterId.Builder builder = ClusterIdProtos.ClusterId.newBuilder();
  return builder.setClusterId(this.id).build();
}
项目:pbase    文件:ClusterId.java   
/**
 * @return A pb instance to represent this instance.
 */
ClusterIdProtos.ClusterId convert() {
  ClusterIdProtos.ClusterId.Builder builder = ClusterIdProtos.ClusterId.newBuilder();
  return builder.setClusterId(this.id).build();
}
项目:HIndex    文件:ClusterId.java   
/**
 * @return A pb instance to represent this instance.
 */
ClusterIdProtos.ClusterId convert() {
  ClusterIdProtos.ClusterId.Builder builder = ClusterIdProtos.ClusterId.newBuilder();
  return builder.setClusterId(this.id).build();
}
项目:PyroDB    文件:ClusterId.java   
/**
 * @return A pb instance to represent this instance.
 */
ClusterIdProtos.ClusterId convert() {
  ClusterIdProtos.ClusterId.Builder builder = ClusterIdProtos.ClusterId.newBuilder();
  return builder.setClusterId(this.id).build();
}
项目:c5    文件:ClusterId.java   
/**
 * @return A pb instance to represent this instance.
 */
ClusterIdProtos.ClusterId convert() {
  ClusterIdProtos.ClusterId.Builder builder = ClusterIdProtos.ClusterId.newBuilder();
  return builder.setClusterId(this.id).build();
}
项目:DominoHBase    文件:ClusterId.java   
/**
 * @return A pb instance to represent this instance.
 */
ClusterIdProtos.ClusterId convert() {
  ClusterIdProtos.ClusterId.Builder builder = ClusterIdProtos.ClusterId.newBuilder();
  return builder.setClusterId(this.id).build();
}
项目:ditb    文件:ClusterId.java   
/**
 * @param cid
 * @return A {@link ClusterId} made from the passed in <code>cid</code>
 */
static ClusterId convert(final ClusterIdProtos.ClusterId cid) {
  return new ClusterId(cid.getClusterId());
}
项目:pbase    文件:ClusterId.java   
/**
 * @param cid
 * @return A {@link ClusterId} made from the passed in <code>cid</code>
 */
static ClusterId convert(final ClusterIdProtos.ClusterId cid) {
  return new ClusterId(cid.getClusterId());
}
项目:HIndex    文件:ClusterId.java   
/**
 * @param cid
 * @return A {@link ClusterId} made from the passed in <code>cid</code>
 */
static ClusterId convert(final ClusterIdProtos.ClusterId cid) {
  return new ClusterId(cid.getClusterId());
}
项目:PyroDB    文件:ClusterId.java   
/**
 * @param cid
 * @return A {@link ClusterId} made from the passed in <code>cid</code>
 */
static ClusterId convert(final ClusterIdProtos.ClusterId cid) {
  return new ClusterId(cid.getClusterId());
}
项目:c5    文件:ClusterId.java   
/**
 * @param cid
 * @return A {@link ClusterId} made from the passed in <code>cid</code>
 */
static ClusterId convert(final ClusterIdProtos.ClusterId cid) {
  return new ClusterId(cid.getClusterId());
}
项目:DominoHBase    文件:ClusterId.java   
/**
 * @param cid
 * @return A {@link ClusterId} made from the passed in <code>cid</code>
 */
static ClusterId convert(final ClusterIdProtos.ClusterId cid) {
  return new ClusterId(cid.getClusterId());
}