程序包 org.bdware.bdledger.api.grpc.pb

# 类 QueryGrpc.QueryImplBase

java.lang.Object
org.bdware.bdledger.api.grpc.pb.QueryGrpc.QueryImplBase

所有已实现的接口:
  `io.grpc.BindableService`

封闭类:
  QueryGrpc

public abstract static class QueryGrpc.QueryImplBase extends Object implements io.grpc.BindableService

- ## 构造器概要

  构造器
  构造器
  说明
  `QueryImplBase()`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `io.grpc.ServerServiceDefinition`
  `bindService()`
  `void`
  `countBlocks​(QueryProto.BlocksRequest request, io.grpc.stub.StreamObserver<QueryProto.CountBlocksResponse> responseObserver)`
  Count all blocks in a ledger, or blocks in a timestamp range 查询帐本中的所有区块数量，或时间范围内的区块数量 Requirement: start_timestamp <= end_timestamp If neither 'start_timestamp' nor 'end_timestamp' is specified, then count all blocks in the specified ledger.
  `void`
  `countTransactions​(QueryProto.TransactionsRequest request, io.grpc.stub.StreamObserver<QueryProto.CountTransactionsResponse> responseObserver)`
  Count all transactions in a ledger, or transactions in a timestamp range 查询帐本中的所有事务数量，或时间范围内的事务数量 'start_timestamp' and 'end_timestamp' follow the same requirements and rules as in 'CountBlocks'.
  `void`
  `getBlockByHash​(QueryProto.GetBlockByHashRequest request, io.grpc.stub.StreamObserver<QueryProto.GetBlockByHashResponse> responseObserver)`
  Get a block identified by its hash 查询哈希所指定的区块
  `void`
  `getBlocks​(QueryProto.BlocksRequest request, io.grpc.stub.StreamObserver<QueryProto.GetBlocksResponse> responseObserver)`
  Get blocks in a timestamp range 查询时间范围内的区块 Requirement: start_timestamp <= end_timestamp If neither 'start_timestamp' nor 'end_timestamp' is specified, then 'start_timestamp' will be set to the genesis block's timestamp, and 'end_timestamp' will be set to (start_timestamp + query.maxDuration) (query.maxDuration is specified in go-bdledger's config file).
  `void`
  `getRecentBlocks​(QueryProto.RecentBlocksRequest request, io.grpc.stub.StreamObserver<QueryProto.GetBlocksResponse> responseObserver)`
  Get recent 'count' blocks (Only support IncludeTransactions=NONE for now) 查询最新的 'count' 个区块
  `void`
  `getTransactionByBlockHashAndIndex​(QueryProto.GetTransactionByBlockHashAndIndexRequest request, io.grpc.stub.StreamObserver<QueryProto.GetTransactionByBlockHashAndIndexResponse> responseObserver)`
  Get a transaction identified by hash of the block it belongs to and its index inside the block 查询所在区块的哈希与其在区块中的index所指定的事务
  `void`
  `getTransactionByHash​(QueryProto.GetTransactionByHashRequest request, io.grpc.stub.StreamObserver<QueryProto.GetTransactionByHashResponse> responseObserver)`
  Get a transaction identified by its hash 查询哈希所指定的事务
  `void`
  `getTransactions​(QueryProto.TransactionsRequest request, io.grpc.stub.StreamObserver<QueryProto.GetTransactionsResponse> responseObserver)`
  Get transactions in a timestamp range 查询时间范围内的事务 'start_timestamp' and 'end_timestamp' follow the same requirements and rules as in 'GetBlocks'.

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 构造器详细资料

  - ### QueryImplBase

    public QueryImplBase()

- ## 方法详细资料

  - ### getBlockByHash

    public void getBlockByHash​(QueryProto.GetBlockByHashRequest request, io.grpc.stub.StreamObserver<QueryProto.GetBlockByHashResponse> responseObserver)

         Get a block identified by its hash
         查询哈希所指定的区块

  - ### getBlocks

    public void getBlocks​(QueryProto.BlocksRequest request, io.grpc.stub.StreamObserver<QueryProto.GetBlocksResponse> responseObserver)

         Get blocks in a timestamp range
         查询时间范围内的区块
         Requirement: start_timestamp <= end_timestamp
         If neither 'start_timestamp' nor 'end_timestamp' is specified, then 'start_timestamp' will be set to
         the genesis block's timestamp, and 'end_timestamp' will be set to (start_timestamp + query.maxDuration)
         (query.maxDuration is specified in go-bdledger's config file).
         If only 'end_timestamp' is not specified, or (end_timestamp - start_timestamp > query.maxDuration),
         then 'end_timestamp' will be set to (start_timestamp + query.maxDuration).
         If only 'start_timestamp' is not specified, then 'start_timestamp' will be set to (end_timestamp - query.maxDuration).
         In all cases, 'start_timestamp' will never be earlier than the genesis block's timestamp,
         and 'end_timestamp' will never be later than the current timestamp when the node process the query request.

  - ### countBlocks

    public void countBlocks​(QueryProto.BlocksRequest request, io.grpc.stub.StreamObserver<QueryProto.CountBlocksResponse> responseObserver)

         Count all blocks in a ledger, or blocks in a timestamp range
         查询帐本中的所有区块数量，或时间范围内的区块数量
         Requirement: start_timestamp <= end_timestamp
         If neither 'start_timestamp' nor 'end_timestamp' is specified, then count all blocks in the specified ledger.
         If only 'end_timestamp' is not specified, then count all blocks with timestamps later than 'start_timestamp'.
         If only 'start_timestamp' is not specified, then count all blocks with timestamps earlier than 'end_timestamp'.
         In all cases, 'start_timestamp' will never be earlier than the genesis block's timestamp,
         and 'end_timestamp' will never be later than the current timestamp when the node process the query request.

  - ### getRecentBlocks

    public void getRecentBlocks​(QueryProto.RecentBlocksRequest request, io.grpc.stub.StreamObserver<QueryProto.GetBlocksResponse> responseObserver)

         Get recent 'count' blocks (Only support IncludeTransactions=NONE for now)
         查询最新的 'count' 个区块

  - ### getTransactionByHash

    public void getTransactionByHash​(QueryProto.GetTransactionByHashRequest request, io.grpc.stub.StreamObserver<QueryProto.GetTransactionByHashResponse> responseObserver)

         Get a transaction identified by its hash
         查询哈希所指定的事务

  - ### getTransactionByBlockHashAndIndex

    public void getTransactionByBlockHashAndIndex​(QueryProto.GetTransactionByBlockHashAndIndexRequest request, io.grpc.stub.StreamObserver<QueryProto.GetTransactionByBlockHashAndIndexResponse> responseObserver)

         Get a transaction identified by hash of the block it belongs to and its index inside the block
         查询所在区块的哈希与其在区块中的index所指定的事务

  - ### getTransactions

    public void getTransactions​(QueryProto.TransactionsRequest request, io.grpc.stub.StreamObserver<QueryProto.GetTransactionsResponse> responseObserver)

         Get transactions in a timestamp range
         查询时间范围内的事务
         'start_timestamp' and 'end_timestamp' follow the same requirements and rules as in 'GetBlocks'.

  - ### countTransactions

    public void countTransactions​(QueryProto.TransactionsRequest request, io.grpc.stub.StreamObserver<QueryProto.CountTransactionsResponse> responseObserver)

         Count all transactions in a ledger, or transactions in a timestamp range
         查询帐本中的所有事务数量，或时间范围内的事务数量
         'start_timestamp' and 'end_timestamp' follow the same requirements and rules as in 'CountBlocks'.

  - ### bindService

    public final io.grpc.ServerServiceDefinition bindService()
    指定者:
      `bindService` 在接口中 `io.grpc.BindableService`