/** * <code>optional .StopTaskProto stop_task = 8;</code> */ public Builder setStopTask( com.microsoft.reef.proto.EvaluatorRuntimeProtocol.StopTaskProto.Builder builderForValue) { if (stopTaskBuilder_ == null) { stopTask_ = builderForValue.build(); onChanged(); } else { stopTaskBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000020; return this; } /**
subBuilder.mergeFrom(stopTask_); stopTask_ = subBuilder.buildPartial();
/** * <code>optional .StopTaskProto stop_task = 8;</code> */ public Builder mergeStopTask(com.microsoft.reef.proto.EvaluatorRuntimeProtocol.StopTaskProto value) { if (stopTaskBuilder_ == null) { if (((bitField0_ & 0x00000020) == 0x00000020) && stopTask_ != com.microsoft.reef.proto.EvaluatorRuntimeProtocol.StopTaskProto.getDefaultInstance()) { stopTask_ = com.microsoft.reef.proto.EvaluatorRuntimeProtocol.StopTaskProto.newBuilder(stopTask_).mergeFrom(value).buildPartial(); } else { stopTask_ = value; } onChanged(); } else { stopTaskBuilder_.mergeFrom(value); } bitField0_ |= 0x00000020; return this; } /**
public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.microsoft.reef.proto.EvaluatorRuntimeProtocol.StopTaskProto parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.microsoft.reef.proto.EvaluatorRuntimeProtocol.StopTaskProto) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
private Builder() { maybeForceBuilderInitialization(); }
public Builder clone() { return create().mergeFrom(buildPartial()); }
public static Builder newBuilder(com.microsoft.reef.proto.EvaluatorRuntimeProtocol.StopTaskProto prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
@Override public void close(final byte[] message) { LOG.log(Level.FINEST, "CLOSE: TaskRuntime id[" + taskId + "] on evaluator id[" + evaluatorManager.getId() + "] with message."); if (this.taskRepresenter.isNotRunning()) { throw new RuntimeException("Trying to send a message to a Task that is no longer RUNNING."); } final ContextControlProto contextControlProto = ContextControlProto.newBuilder() .setStopTask(StopTaskProto.newBuilder().build()) .setTaskMessage(ByteString.copyFrom(message)) .build(); this.evaluatorManager.sendContextControlMessage(contextControlProto); }
@Override public void close() { LOG.log(Level.FINEST, "CLOSE: TaskRuntime id[" + taskId + "] on evaluator id[" + evaluatorManager.getId() + "]"); if (this.taskRepresenter.isNotRunning()) { LOG.log(Level.FINE, "Ignoring call to .close() because the task is no longer RUNNING."); } else { final ContextControlProto contextControlProto = ContextControlProto.newBuilder() .setStopTask(StopTaskProto.newBuilder().build()) .build(); this.evaluatorManager.sendContextControlMessage(contextControlProto); } }
public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.microsoft.reef.proto.EvaluatorRuntimeProtocol.StopTaskProto) { return mergeFrom((com.microsoft.reef.proto.EvaluatorRuntimeProtocol.StopTaskProto)other); } else { super.mergeFrom(other); return this; } }
private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() {
public Builder mergeFrom(com.microsoft.reef.proto.EvaluatorRuntimeProtocol.StopTaskProto other) { if (other == com.microsoft.reef.proto.EvaluatorRuntimeProtocol.StopTaskProto.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; }
private static Builder create() { return new Builder(); }
public com.microsoft.reef.proto.EvaluatorRuntimeProtocol.StopTaskProto build() { com.microsoft.reef.proto.EvaluatorRuntimeProtocol.StopTaskProto result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
@java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
public com.microsoft.reef.proto.EvaluatorRuntimeProtocol.StopTaskProto buildPartial() { com.microsoft.reef.proto.EvaluatorRuntimeProtocol.StopTaskProto result = new com.microsoft.reef.proto.EvaluatorRuntimeProtocol.StopTaskProto(this); onBuilt(); return result; }