public org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse buildPartial() { org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse result = new org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse(this); if (typeCase_ == 1) { result.type_ = type_; } if (typeCase_ == 2) { if (blockBuilder_ == null) { result.type_ = type_; } else { result.type_ = blockBuilder_.build(); } } if (typeCase_ == 3) { if (filteredBlockBuilder_ == null) { result.type_ = type_; } else { result.type_ = filteredBlockBuilder_.build(); } } result.typeCase_ = typeCase_; onBuilt(); return result; }
PeerEventServiceClient.this.toString(), resp.getStatusValue(), resp.getStatus(), resp.getTypeCase())); final DeliverResponse.TypeCase typeCase = resp.getTypeCase(); PeerEventServiceClient.this.toString())); if (resp.getStatus() == Common.Status.SUCCESS) { // unlike you may think this only happens when all blocks are fetched. peer.setLastConnectTime(System.currentTimeMillis()); peer.resetReconnectCount(); PeerEventServiceClient.this.toString(), rec, resp.getStatusValue(), resp.getStatus().name())); peerEventingServiceException.setResponse(resp); if (rec % 10 == 0) { if (typeCase == BLOCK) { logger.trace(format("%s got event block hex hashcode: %016x, block number: %d", PeerEventServiceClient.this.toString(), resp.getBlock().hashCode(), resp.getBlock().getHeader().getNumber())); } else { logger.trace(format("%s got event block hex hashcode: %016x, block number: %d", PeerEventServiceClient.this.toString(), resp.getFilteredBlock().hashCode(), resp.getFilteredBlock().getNumber()));
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); switch (typeCase_) { case 1: hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatusValue(); break; case 2: hash = (37 * hash) + BLOCK_FIELD_NUMBER; hash = (53 * hash) + getBlock().hashCode(); break; case 3: hash = (37 * hash) + FILTERED_BLOCK_FIELD_NUMBER; hash = (53 * hash) + getFilteredBlock().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
e).setUnfinishedMessage(this); } finally { makeExtensionsImmutable();
e).setUnfinishedMessage(this); } finally { makeExtensionsImmutable();
PeerEventServiceClient.this.toString(), resp.getStatusValue(), resp.getStatus(), resp.getTypeCase())); final DeliverResponse.TypeCase typeCase = resp.getTypeCase(); PeerEventServiceClient.this.toString())); if (resp.getStatus() == Common.Status.SUCCESS) { // unlike you may think this only happens when all blocks are fetched. peer.setLastConnectTime(System.currentTimeMillis()); peer.resetReconnectCount(); PeerEventServiceClient.this.toString(), rec, resp.getStatusValue(), resp.getStatus().name())); peerEventingServiceException.setResponse(resp); if (rec % 10 == 0) { if (typeCase == BLOCK) { logger.trace(format("%s got event block hex hashcode: %016x, block number: %d", PeerEventServiceClient.this.toString(), resp.getBlock().hashCode(), resp.getBlock().getHeader().getNumber())); } else { logger.trace(format("%s got event block hex hashcode: %016x, block number: %d", PeerEventServiceClient.this.toString(), resp.getFilteredBlock().hashCode(), resp.getFilteredBlock().getNumber()));
channelName, peer.getName(), resp.getStatusValue(), resp.getStatus(), resp.getTypeCase())); final DeliverResponse.TypeCase typeCase = resp.getTypeCase(); channelName, peer.getName())); if (resp.getStatus() == Common.Status.SUCCESS) { // unlike you may think this only happens when all blocks are fetched. peer.setLastConnectTime(System.currentTimeMillis()); peer.resetReconnectCount(); channelName, peer.getName(), resp.getStatusValue(), resp.getStatus().name()))); if (typeCase == BLOCK) { logger.trace(format("Channel %s peer %s got event block hex hashcode: %016x, block number: %d", channelName, peer.getName(), resp.getBlock().hashCode(), resp.getBlock().getHeader().getNumber())); } else { logger.trace(format("Channel %s peer %s got event block hex hashcode: %016x, block number: %d", channelName, peer.getName(), resp.getFilteredBlock().hashCode(), resp.getFilteredBlock().getNumber()));
@io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "DeliverFiltered", requestType = org.hyperledger.fabric.protos.common.Common.Envelope.class, responseType = org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) public static io.grpc.MethodDescriptor<org.hyperledger.fabric.protos.common.Common.Envelope, org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse> getDeliverFilteredMethod() { io.grpc.MethodDescriptor<org.hyperledger.fabric.protos.common.Common.Envelope, org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse> getDeliverFilteredMethod; if ((getDeliverFilteredMethod = DeliverGrpc.getDeliverFilteredMethod) == null) { synchronized (DeliverGrpc.class) { if ((getDeliverFilteredMethod = DeliverGrpc.getDeliverFilteredMethod) == null) { DeliverGrpc.getDeliverFilteredMethod = getDeliverFilteredMethod = io.grpc.MethodDescriptor.<org.hyperledger.fabric.protos.common.Common.Envelope, org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName( "protos.Deliver", "DeliverFiltered")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.common.Common.Envelope.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse.getDefaultInstance())) .setSchemaDescriptor(new DeliverMethodDescriptorSupplier("DeliverFiltered")) .build(); } } } return getDeliverFilteredMethod; }
result = result && getTypeCase().equals( other.getTypeCase()); if (!result) return false; switch (typeCase_) { case 1: result = result && getStatusValue() == other.getStatusValue(); break; case 2: result = result && getBlock() .equals(other.getBlock()); break; case 3: result = result && getFilteredBlock() .equals(other.getFilteredBlock()); break; case 0:
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); switch (typeCase_) { case 1: hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatusValue(); break; case 2: hash = (37 * hash) + BLOCK_FIELD_NUMBER; hash = (53 * hash) + getBlock().hashCode(); break; case 3: hash = (37 * hash) + FILTERED_BLOCK_FIELD_NUMBER; hash = (53 * hash) + getFilteredBlock().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); switch (typeCase_) { case 1: hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatusValue(); break; case 2: hash = (37 * hash) + BLOCK_FIELD_NUMBER; hash = (53 * hash) + getBlock().hashCode(); break; case 3: hash = (37 * hash) + FILTERED_BLOCK_FIELD_NUMBER; hash = (53 * hash) + getFilteredBlock().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
result = result && getTypeCase().equals( other.getTypeCase()); if (!result) return false; switch (typeCase_) { case 1: result = result && getStatusValue() == other.getStatusValue(); break; case 2: result = result && getBlock() .equals(other.getBlock()); break; case 3: result = result && getFilteredBlock() .equals(other.getFilteredBlock()); break; case 0:
@io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Deliver", requestType = org.hyperledger.fabric.protos.common.Common.Envelope.class, responseType = org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) public static io.grpc.MethodDescriptor<org.hyperledger.fabric.protos.common.Common.Envelope, org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse> getDeliverMethod() { io.grpc.MethodDescriptor<org.hyperledger.fabric.protos.common.Common.Envelope, org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse> getDeliverMethod; if ((getDeliverMethod = DeliverGrpc.getDeliverMethod) == null) { synchronized (DeliverGrpc.class) { if ((getDeliverMethod = DeliverGrpc.getDeliverMethod) == null) { DeliverGrpc.getDeliverMethod = getDeliverMethod = io.grpc.MethodDescriptor.<org.hyperledger.fabric.protos.common.Common.Envelope, org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName( "protos.Deliver", "Deliver")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.common.Common.Envelope.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse.getDefaultInstance())) .setSchemaDescriptor(new DeliverMethodDescriptorSupplier("Deliver")) .build(); } } } return getDeliverMethod; }
private static io.grpc.MethodDescriptor<org.hyperledger.fabric.protos.common.Common.Envelope, org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse> getDeliverMethodHelper() { io.grpc.MethodDescriptor<org.hyperledger.fabric.protos.common.Common.Envelope, org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse> getDeliverMethod; if ((getDeliverMethod = DeliverGrpc.getDeliverMethod) == null) { synchronized (DeliverGrpc.class) { if ((getDeliverMethod = DeliverGrpc.getDeliverMethod) == null) { DeliverGrpc.getDeliverMethod = getDeliverMethod = io.grpc.MethodDescriptor.<org.hyperledger.fabric.protos.common.Common.Envelope, org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName( "protos.Deliver", "Deliver")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.common.Common.Envelope.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse.getDefaultInstance())) .setSchemaDescriptor(new DeliverMethodDescriptorSupplier("Deliver")) .build(); } } } return getDeliverMethod; } @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse buildPartial() { org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse result = new org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse(this); if (typeCase_ == 1) { result.type_ = type_; } if (typeCase_ == 2) { if (blockBuilder_ == null) { result.type_ = type_; } else { result.type_ = blockBuilder_.build(); } } if (typeCase_ == 3) { if (filteredBlockBuilder_ == null) { result.type_ = type_; } else { result.type_ = filteredBlockBuilder_.build(); } } result.typeCase_ = typeCase_; onBuilt(); return result; }
public org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse buildPartial() { org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse result = new org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse(this); if (typeCase_ == 1) { result.type_ = type_; } if (typeCase_ == 2) { if (blockBuilder_ == null) { result.type_ = type_; } else { result.type_ = blockBuilder_.build(); } } if (typeCase_ == 3) { if (filteredBlockBuilder_ == null) { result.type_ = type_; } else { result.type_ = filteredBlockBuilder_.build(); } } result.typeCase_ = typeCase_; onBuilt(); return result; }
private static io.grpc.MethodDescriptor<org.hyperledger.fabric.protos.common.Common.Envelope, org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse> getDeliverFilteredMethodHelper() { io.grpc.MethodDescriptor<org.hyperledger.fabric.protos.common.Common.Envelope, org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse> getDeliverFilteredMethod; if ((getDeliverFilteredMethod = DeliverGrpc.getDeliverFilteredMethod) == null) { synchronized (DeliverGrpc.class) { if ((getDeliverFilteredMethod = DeliverGrpc.getDeliverFilteredMethod) == null) { DeliverGrpc.getDeliverFilteredMethod = getDeliverFilteredMethod = io.grpc.MethodDescriptor.<org.hyperledger.fabric.protos.common.Common.Envelope, org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName( "protos.Deliver", "DeliverFiltered")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.common.Common.Envelope.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse.getDefaultInstance())) .setSchemaDescriptor(new DeliverMethodDescriptorSupplier("DeliverFiltered")) .build(); } } } return getDeliverFilteredMethod; }
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse other) { if (other == org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse.getDefaultInstance()) return this; switch (other.getTypeCase()) { case STATUS: { setStatusValue(other.getStatusValue()); break; } case BLOCK: { mergeBlock(other.getBlock()); break; } case FILTERED_BLOCK: { mergeFilteredBlock(other.getFilteredBlock()); break; } case TYPE_NOT_SET: { break; } } onChanged(); return this; }
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse other) { if (other == org.hyperledger.fabric.protos.peer.PeerEvents.DeliverResponse.getDefaultInstance()) return this; switch (other.getTypeCase()) { case STATUS: { setStatusValue(other.getStatusValue()); break; } case BLOCK: { mergeBlock(other.getBlock()); break; } case FILTERED_BLOCK: { mergeFilteredBlock(other.getFilteredBlock()); break; } case TYPE_NOT_SET: { break; } } onChanged(); return this; }
BlockInfo(PeerEvents.DeliverResponse resp) { final PeerEvents.DeliverResponse.TypeCase type = resp.getTypeCase(); if (type == PeerEvents.DeliverResponse.TypeCase.BLOCK) { final Block respBlock = resp.getBlock(); filteredBlock = null; if (respBlock == null) { throw new AssertionError("DeliverResponse type block but block is null"); } this.block = new BlockDeserializer(respBlock); } else if (type == PeerEvents.DeliverResponse.TypeCase.FILTERED_BLOCK) { filteredBlock = resp.getFilteredBlock(); block = null; if (filteredBlock == null) { throw new AssertionError("DeliverResponse type filter block but filter block is null"); } } else { throw new AssertionError(format("DeliverResponse type has unexpected type: %s, %d", type.name(), type.getNumber())); } }