jobControl_ = com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto.getDefaultInstance(); } else { jobControlBuilder_.clear();
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasIdentifier()) { hash = (37 * hash) + IDENTIFIER_FIELD_NUMBER; hash = (53 * hash) + getIdentifier().hashCode(); } if (hasSignal()) { hash = (37 * hash) + SIGNAL_FIELD_NUMBER; hash = (53 * hash) + hashEnum(getSignal()); } if (hasMessage()) { hash = (37 * hash) + MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getMessage().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getIdentifierBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, signal_.getNumber()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, message_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
if (hasJobControl()) { result = result && getJobControl() .equals(other.getJobControl());
/** * This method reacts to control messages passed by the client to the driver. It will forward * messages related to the ClientObserver interface to the Driver. It will also initiate a shutdown * if the client indicates a close message. * * @param jobControlProto contains the client initiated control message */ @Override public synchronized void onNext(final ClientRuntimeProtocol.JobControlProto jobControlProto) { if (jobControlProto.hasSignal()) { if (jobControlProto.getSignal() == ClientRuntimeProtocol.Signal.SIG_TERMINATE) { try { if (jobControlProto.hasMessage()) { getClientCloseWithMessageDispatcher().onNext(jobControlProto.getMessage().toByteArray()); } else { getClientCloseDispatcher().onNext(null); } } finally { this.driverStatusManager.onComplete(); } } else { LOG.log(Level.FINEST, "Unsupported signal: " + jobControlProto.getSignal()); } } else if (jobControlProto.hasMessage()) { getClientMessageDispatcher().onNext(jobControlProto.getMessage().toByteArray()); } }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto)) { return super.equals(obj); } com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto other = (com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto) obj; boolean result = true; result = result && (hasIdentifier() == other.hasIdentifier()); if (hasIdentifier()) { result = result && getIdentifier() .equals(other.getIdentifier()); } result = result && (hasSignal() == other.hasSignal()); if (hasSignal()) { result = result && (getSignal() == other.getSignal()); } result = result && (hasMessage() == other.hasMessage()); if (hasMessage()) { result = result && getMessage() .equals(other.getMessage()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
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; }
/** * <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; }
public com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto getDefaultInstanceForType() { return com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto.getDefaultInstance(); }
/** * <code>optional .JobControlProto jobControl = 2;</code> */ public Builder clearJobControl() { if (jobControlBuilder_ == null) { jobControl_ = com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto.getDefaultInstance(); onChanged(); } else { jobControlBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; } /**
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getIdentifierBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeEnum(2, signal_.getNumber()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, message_); } getUnknownFields().writeTo(output); }
/** * <code>required string identifier = 1;</code> */ public Builder clearIdentifier() { bitField0_ = (bitField0_ & ~0x00000001); identifier_ = getDefaultInstance().getIdentifier(); onChanged(); return this; } /**
private void initFields() { jobSubmission_ = com.microsoft.reef.proto.ClientRuntimeProtocol.JobSubmissionProto.getDefaultInstance(); jobControl_ = com.microsoft.reef.proto.ClientRuntimeProtocol.JobControlProto.getDefaultInstance(); runtimeError_ = com.microsoft.reef.proto.ReefServiceProtos.RuntimeErrorProto.getDefaultInstance(); jobStatus_ = com.microsoft.reef.proto.ReefServiceProtos.JobStatusProto.getDefaultInstance(); evaluatorControl_ = com.microsoft.reef.proto.EvaluatorRuntimeProtocol.EvaluatorControlProto.getDefaultInstance(); evaluatorHeartBeat_ = com.microsoft.reef.proto.EvaluatorRuntimeProtocol.EvaluatorHeartbeatProto.getDefaultInstance(); } private byte memoizedIsInitialized = -1;
/** * <code>optional bytes message = 3;</code> */ public Builder clearMessage() { bitField0_ = (bitField0_ & ~0x00000004); message_ = getDefaultInstance().getMessage(); onChanged(); return this; }