@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasStreamInfo()) { hash = (37 * hash) + STREAMINFO_FIELD_NUMBER; hash = (53 * hash) + getStreamInfo().hashCode(); } if (hasTxnId()) { hash = (37 * hash) + TXNID_FIELD_NUMBER; hash = (53 * hash) + getTxnId().hashCode(); } hash = (37 * hash) + LEASE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getLease()); 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.PingTxnRequest)) { return super.equals(obj); } io.pravega.controller.stream.api.grpc.v1.Controller.PingTxnRequest other = (io.pravega.controller.stream.api.grpc.v1.Controller.PingTxnRequest) obj; boolean result = true; result = result && (hasStreamInfo() == other.hasStreamInfo()); if (hasStreamInfo()) { result = result && getStreamInfo() .equals(other.getStreamInfo()); } result = result && (hasTxnId() == other.hasTxnId()); if (hasTxnId()) { result = result && getTxnId() .equals(other.getTxnId()); } result = result && (getLease() == other.getLease()); result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(io.pravega.controller.stream.api.grpc.v1.Controller.PingTxnRequest other) { if (other == io.pravega.controller.stream.api.grpc.v1.Controller.PingTxnRequest.getDefaultInstance()) return this; if (other.hasStreamInfo()) { mergeStreamInfo(other.getStreamInfo()); } if (other.hasTxnId()) { mergeTxnId(other.getTxnId()); } if (other.getLease() != 0L) { setLease(other.getLease()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@Override public void pingTransaction(PingTxnRequest request, StreamObserver<PingTxnStatus> responseObserver) { log.info("pingTransaction called for stream {}/{}, txnId={}", request.getStreamInfo().getScope(), request.getStreamInfo().getStream(), request.getTxnId()); authenticateExecuteAndProcessResults(() -> this.authHelper.checkAuthorization(request.getStreamInfo().getScope() + "/" + request.getStreamInfo().getStream(), AuthHandler.Permissions.READ), delegationToken -> controllerService.pingTransaction(request.getStreamInfo().getScope(), request.getStreamInfo().getStream(), request.getTxnId(), request.getLease()), responseObserver); }