Ejemplo n.º 1
0
  @Override
  public TabletProto getProto() {
    if (!viaProto) {
      mergeLocalToBuilder();
      proto = builder.build();
      viaProto = true;
    }

    return proto;
  }
Ejemplo n.º 2
0
  protected void mergeLocalToBuilder() {
    if (builder == null) {
      this.builder = TabletProto.newBuilder(proto);
    }

    if (this.fragmentId != null) {
      builder.setId(this.fragmentId);
    }

    if (this.startOffset != null) {
      builder.setStartOffset(this.startOffset);
    }

    if (this.meta != null) {
      builder.setMeta(meta.getProto());
    }

    if (this.length != null) {
      builder.setLength(this.length);
    }

    if (this.path != null) {
      builder.setPath(this.path.toString());
    }

    if (this.distCached != null) {
      builder.setDistCached(this.distCached);
    }
  }