public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { alluxio.proto.journal.File.StringPairEntry parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (alluxio.proto.journal.File.StringPairEntry) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_;
/** * <code>optional string key = 1;</code> */ public Builder setKey( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; key_ = value; onChanged(); return this; } /**
@Override public Journal.JournalEntry next() { if (!hasNext()) { throw new NoSuchElementException(); } String alluxioPath = mEntry.getKey(); MountInfo info = mEntry.getValue(); mEntry = null; Map<String, String> properties = info.getOptions().getProperties(); List<File.StringPairEntry> protoProperties = new ArrayList<>(properties.size()); for (Map.Entry<String, String> property : properties.entrySet()) { protoProperties.add(File.StringPairEntry.newBuilder() .setKey(property.getKey()) .setValue(property.getValue()) .build()); } AddMountPointEntry addMountPoint = AddMountPointEntry.newBuilder().setAlluxioPath(alluxioPath) .setMountId(info.getMountId()).setUfsPath(info.getUfsUri().toString()) .setReadOnly(info.getOptions().isReadOnly()).addAllProperties(protoProperties) .setShared(info.getOptions().isShared()).build(); return Journal.JournalEntry.newBuilder().setAddMountPoint(addMountPoint).build(); }
public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { alluxio.proto.journal.File.StringPairEntry parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (alluxio.proto.journal.File.StringPairEntry) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_;
/** * <code>repeated .alluxio.proto.journal.StringPairEntry properties = 4;</code> */ public Builder addProperties( alluxio.proto.journal.File.StringPairEntry.Builder builderForValue) { if (propertiesBuilder_ == null) { ensurePropertiesIsMutable(); properties_.add(builderForValue.build()); onChanged(); } else { propertiesBuilder_.addMessage(builderForValue.build()); } return this; } /**
public alluxio.proto.journal.File.StringPairEntry buildPartial() { alluxio.proto.journal.File.StringPairEntry result = new alluxio.proto.journal.File.StringPairEntry(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.key_ = key_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.value_ = value_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
/** * <code>optional string value = 2;</code> */ public Builder setValue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; value_ = value; onChanged(); return this; } /**
/** * <code>optional string key = 1;</code> */ public Builder setKey( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; key_ = value; onChanged(); return this; } /**
private static Builder create() { return new Builder(); }
public Builder clone() { return create().mergeFrom(buildPartial()); }
private Builder() { maybeForceBuilderInitialization(); }
/** * <code>repeated .alluxio.proto.journal.StringPairEntry properties = 4;</code> */ public Builder addProperties( int index, alluxio.proto.journal.File.StringPairEntry.Builder builderForValue) { if (propertiesBuilder_ == null) { ensurePropertiesIsMutable(); properties_.add(index, builderForValue.build()); onChanged(); } else { propertiesBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .alluxio.proto.journal.StringPairEntry properties = 4;</code> */ public Builder setProperties( int index, alluxio.proto.journal.File.StringPairEntry.Builder builderForValue) { if (propertiesBuilder_ == null) { ensurePropertiesIsMutable(); properties_.set(index, builderForValue.build()); onChanged(); } else { propertiesBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
public Builder mergeFrom(alluxio.proto.journal.File.StringPairEntry other) { if (other == alluxio.proto.journal.File.StringPairEntry.getDefaultInstance()) return this; if (other.hasKey()) { bitField0_ |= 0x00000001; key_ = other.key_; onChanged(); } if (other.hasValue()) { bitField0_ |= 0x00000002; value_ = other.value_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public static Builder newBuilder(alluxio.proto.journal.File.StringPairEntry prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
/** * <code>optional string value = 2;</code> */ public Builder setValueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; value_ = value; onChanged(); return this; }
public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof alluxio.proto.journal.File.StringPairEntry) { return mergeFrom((alluxio.proto.journal.File.StringPairEntry)other); } else { super.mergeFrom(other); return this; } }
@java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**