/** * <code>optional .JobControlProto jobControl = 2;</code> */ public Builder setJobControl( com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto.Builder builderForValue) { if (jobControlBuilder_ == null) { jobControl_ = builderForValue.build(); onChanged(); } else { jobControlBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; return this; } /**
subBuilder.mergeFrom(jobControl_); jobControl_ = subBuilder.buildPartial();
public com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto buildPartial() { com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto result = new com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.identifier_ = identifier_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.signal_ = signal_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.message_ = message_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_;
/** * <code>optional .JobControlProto jobControl = 2;</code> */ public Builder mergeJobControl(com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto value) { if (jobControlBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && jobControl_ != com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto.getDefaultInstance()) { jobControl_ = com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto.newBuilder(jobControl_).mergeFrom(value).buildPartial(); } else { jobControl_ = value; } onChanged(); } else { jobControlBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /**
public Builder mergeFrom(com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto other) { if (other == com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto.getDefaultInstance()) return this; if (other.hasIdentifier()) { bitField0_ |= 0x00000001; identifier_ = other.identifier_; onChanged(); } if (other.hasSignal()) { setSignal(other.getSignal()); } if (other.hasMessage()) { setMessage(other.getMessage()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
private static Builder create() { return new Builder(); }
private Builder() { maybeForceBuilderInitialization(); }
private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() {
@java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
public Builder clone() { return create().mergeFrom(buildPartial()); }
public static Builder newBuilder(com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
@Override public synchronized void send(final byte[] message) { this.jobControlHandler.onNext( JobControlProto.newBuilder() .setIdentifier(this.jobId) .setMessage(ByteString.copyFrom(message)) .build() ); }
@Override public synchronized void close(final byte[] message) { this.jobControlHandler.onNext( JobControlProto.newBuilder() .setIdentifier(this.jobId) .setSignal(Signal.SIG_TERMINATE) .setMessage(ByteString.copyFrom(message)) .build() ); }
public final boolean isInitialized() { if (!hasIdentifier()) { return false; } return true; }
public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto) { return mergeFrom((com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto)other); } else { super.mergeFrom(other); return this; } }
public com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto build() { com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
@Override public synchronized void close() { this.jobControlHandler.onNext( JobControlProto.newBuilder() .setIdentifier(this.jobId) .setSignal(Signal.SIG_TERMINATE) .build() ); }