/** * <code>optional .hadoop.yarn.StrictPreemptionContractProto strictContract = 1;</code> */ public Builder setStrictContract( org.apache.hadoop.yarn.proto.YarnProtos.StrictPreemptionContractProto.Builder builderForValue) { if (strictContractBuilder_ == null) { strictContract_ = builderForValue.build(); onChanged(); } else { strictContractBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; return this; } /**
subBuilder.mergeFrom(strictContract_); strictContract_ = subBuilder.buildPartial();
bitField0_ = (bitField0_ & ~0x00000001); } else { ensureContainerIsMutable(); container_.addAll(other.container_); onChanged(); containerBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getContainerFieldBuilder() : null; } else { containerBuilder_.addAllMessages(other.container_); this.mergeUnknownFields(other.getUnknownFields()); return this;
private void addContainersToProto() { maybeInitBuilder(); builder.clearContainer(); if (containers == null) { return; } Iterable<PreemptionContainerProto> iterable = new Iterable<PreemptionContainerProto>() { @Override public Iterator<PreemptionContainerProto> iterator() { return new Iterator<PreemptionContainerProto>() { Iterator<PreemptionContainer> iter = containers.iterator(); @Override public boolean hasNext() { return iter.hasNext(); } @Override public PreemptionContainerProto next() { return convertToProtoFormat(iter.next()); } @Override public void remove() { throw new UnsupportedOperationException(); } }; } }; builder.addAllContainer(iterable); }
private void addContainersToProto() { maybeInitBuilder(); builder.clearContainer(); if (containers == null) { return; } Iterable<PreemptionContainerProto> iterable = new Iterable<PreemptionContainerProto>() { @Override public Iterator<PreemptionContainerProto> iterator() { return new Iterator<PreemptionContainerProto>() { Iterator<PreemptionContainer> iter = containers.iterator(); @Override public boolean hasNext() { return iter.hasNext(); } @Override public PreemptionContainerProto next() { return convertToProtoFormat(iter.next()); } @Override public void remove() { throw new UnsupportedOperationException(); } }; } }; builder.addAllContainer(iterable); }
private void addContainersToProto() { maybeInitBuilder(); builder.clearContainer(); if (containers == null) { return; } Iterable<PreemptionContainerProto> iterable = new Iterable<PreemptionContainerProto>() { @Override public Iterator<PreemptionContainerProto> iterator() { return new Iterator<PreemptionContainerProto>() { Iterator<PreemptionContainer> iter = containers.iterator(); @Override public boolean hasNext() { return iter.hasNext(); } @Override public PreemptionContainerProto next() { return convertToProtoFormat(iter.next()); } @Override public void remove() { throw new UnsupportedOperationException(); } }; } }; builder.addAllContainer(iterable); }
/** * <code>optional .hadoop.yarn.StrictPreemptionContractProto strictContract = 1;</code> */ public Builder mergeStrictContract(org.apache.hadoop.yarn.proto.YarnProtos.StrictPreemptionContractProto value) { if (strictContractBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && strictContract_ != org.apache.hadoop.yarn.proto.YarnProtos.StrictPreemptionContractProto.getDefaultInstance()) { strictContract_ = org.apache.hadoop.yarn.proto.YarnProtos.StrictPreemptionContractProto.newBuilder(strictContract_).mergeFrom(value).buildPartial(); } else { strictContract_ = value; } onChanged(); } else { strictContractBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; return this; } /**
/** * <code>repeated .hadoop.yarn.PreemptionContainerProto container = 1;</code> */ public Builder addContainer( int index, org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContainerProto value) { if (containerBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureContainerIsMutable(); container_.add(index, value); onChanged(); } else { containerBuilder_.addMessage(index, value); } return this; } /**
/** * <code>repeated .hadoop.yarn.PreemptionContainerProto container = 1;</code> */ public Builder setContainer( int index, org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContainerProto value) { if (containerBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureContainerIsMutable(); container_.set(index, value); onChanged(); } else { containerBuilder_.setMessage(index, value); } return this; } /**
/** * <code>repeated .hadoop.yarn.PreemptionContainerProto container = 1;</code> */ public Builder addContainer(org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContainerProto value) { if (containerBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureContainerIsMutable(); container_.add(value); onChanged(); } else { containerBuilder_.addMessage(value); } return this; } /**
/** * <code>repeated .hadoop.yarn.PreemptionContainerProto container = 1;</code> */ public Builder addContainer( int index, org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContainerProto.Builder builderForValue) { if (containerBuilder_ == null) { ensureContainerIsMutable(); container_.add(index, builderForValue.build()); onChanged(); } else { containerBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .hadoop.yarn.PreemptionContainerProto container = 1;</code> */ public Builder addContainer( org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContainerProto.Builder builderForValue) { if (containerBuilder_ == null) { ensureContainerIsMutable(); container_.add(builderForValue.build()); onChanged(); } else { containerBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * <code>repeated .hadoop.yarn.PreemptionContainerProto container = 1;</code> */ public Builder setContainer( int index, org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContainerProto.Builder builderForValue) { if (containerBuilder_ == null) { ensureContainerIsMutable(); container_.set(index, builderForValue.build()); onChanged(); } else { containerBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
private static Builder create() { return new Builder(); }
/** * <code>repeated .hadoop.yarn.PreemptionContainerProto container = 1;</code> */ public Builder removeContainer(int index) { if (containerBuilder_ == null) { ensureContainerIsMutable(); container_.remove(index); onChanged(); } else { containerBuilder_.remove(index); } return this; } /**
/** * <code>repeated .hadoop.yarn.PreemptionContainerProto container = 1;</code> */ public Builder addAllContainer( java.lang.Iterable<? extends org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContainerProto> values) { if (containerBuilder_ == null) { ensureContainerIsMutable(); super.addAll(values, container_); onChanged(); } else { containerBuilder_.addAllMessages(values); } return this; } /**
public Builder clone() { return create().mergeFrom(buildPartial()); }
@java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
public org.apache.hadoop.yarn.proto.YarnProtos.StrictPreemptionContractProto build() { org.apache.hadoop.yarn.proto.YarnProtos.StrictPreemptionContractProto result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
private void mergeLocalToProto() { if (viaProto) maybeInitBuilder(); mergeLocalToBuilder(); proto = builder.build(); viaProto = true; }