@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; }
/** * 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 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; }