/** * Returns UUID of transaction with given TxnId. * * @param txnId The Transaction Id. * @return UUID of the transaction. */ public static final UUID encode(final TxnId txnId) { Preconditions.checkNotNull(txnId, "txnId"); return new UUID(txnId.getHighBits(), txnId.getLowBits()); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + HIGHBITS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getHighBits()); hash = (37 * hash) + LOWBITS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getLowBits()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.pravega.controller.stream.api.grpc.v1.Controller.TxnId)) { return super.equals(obj); } io.pravega.controller.stream.api.grpc.v1.Controller.TxnId other = (io.pravega.controller.stream.api.grpc.v1.Controller.TxnId) obj; boolean result = true; result = result && (getHighBits() == other.getHighBits()); result = result && (getLowBits() == other.getLowBits()); result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(io.pravega.controller.stream.api.grpc.v1.Controller.TxnId other) { if (other == io.pravega.controller.stream.api.grpc.v1.Controller.TxnId.getDefaultInstance()) return this; if (other.getHighBits() != 0L) { setHighBits(other.getHighBits()); } if (other.getLowBits() != 0L) { setLowBits(other.getLowBits()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }