类 QueryGrpc.QueryFutureStub

java.lang.Object
io.grpc.stub.AbstractStub<S>
io.grpc.stub.AbstractFutureStub<QueryGrpc.QueryFutureStub>
org.bdware.bdledger.api.grpc.pb.QueryGrpc.QueryFutureStub
封闭类:
QueryGrpc

public static final class QueryGrpc.QueryFutureStub extends io.grpc.stub.AbstractFutureStub<QueryGrpc.QueryFutureStub>
  • 方法详细资料

    • build

      protected QueryGrpc.QueryFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
      指定者:
      build 在类中 io.grpc.stub.AbstractStub<QueryGrpc.QueryFutureStub>
    • getBlockByHash

      public com.google.common.util.concurrent.ListenableFuture<QueryProto.GetBlockByHashResponse> getBlockByHash(QueryProto.GetBlockByHashRequest request)
      
       Get a block identified by its hash
       查询哈希所指定的区块
       
    • getBlocks

      public com.google.common.util.concurrent.ListenableFuture<QueryProto.GetBlocksResponse> getBlocks(QueryProto.BlocksRequest request)
      
       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 com.google.common.util.concurrent.ListenableFuture<QueryProto.CountBlocksResponse> countBlocks(QueryProto.BlocksRequest request)
      
       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 com.google.common.util.concurrent.ListenableFuture<QueryProto.GetBlocksResponse> getRecentBlocks(QueryProto.RecentBlocksRequest request)
      
       Get recent 'count' blocks (Only support IncludeTransactions=NONE for now)
       查询最新的 'count' 个区块
       
    • getTransactionByHash

      public com.google.common.util.concurrent.ListenableFuture<QueryProto.GetTransactionByHashResponse> getTransactionByHash(QueryProto.GetTransactionByHashRequest request)
      
       Get a transaction identified by its hash
       查询哈希所指定的事务
       
    • getTransactionByBlockHashAndIndex

      public com.google.common.util.concurrent.ListenableFuture<QueryProto.GetTransactionByBlockHashAndIndexResponse> getTransactionByBlockHashAndIndex(QueryProto.GetTransactionByBlockHashAndIndexRequest request)
      
       Get a transaction identified by hash of the block it belongs to and its index inside the block
       查询所在区块的哈希与其在区块中的index所指定的事务
       
    • getTransactions

      public com.google.common.util.concurrent.ListenableFuture<QueryProto.GetTransactionsResponse> getTransactions(QueryProto.TransactionsRequest request)
      
       Get transactions in a timestamp range
       查询时间范围内的事务
       'start_timestamp' and 'end_timestamp' follow the same requirements and rules as in 'GetBlocks'.
       
    • countTransactions

      public com.google.common.util.concurrent.ListenableFuture<QueryProto.CountTransactionsResponse> countTransactions(QueryProto.TransactionsRequest request)
      
       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'.