Package org.bdware.bdledger.api.grpc.pb
Class QueryGrpc.QueryBlockingStub
java.lang.Object
io.grpc.stub.AbstractStub<S>
io.grpc.stub.AbstractBlockingStub<QueryGrpc.QueryBlockingStub>
org.bdware.bdledger.api.grpc.pb.QueryGrpc.QueryBlockingStub
- Enclosing class:
QueryGrpc
public static final class QueryGrpc.QueryBlockingStub
extends io.grpc.stub.AbstractBlockingStub<QueryGrpc.QueryBlockingStub>
-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub
io.grpc.stub.AbstractStub.StubFactory<T extends io.grpc.stub.AbstractStub<T>>
-
Method Summary
Modifier and TypeMethodDescriptionprotected QueryGrpc.QueryBlockingStub
build
(io.grpc.Channel channel, io.grpc.CallOptions callOptions) 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.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'.Get a block identified by its hash 查询哈希所指定的区块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).Get recent 'count' blocks (Only support IncludeTransactions=NONE for now) 查询最新的 'count' 个区块Get a transaction identified by hash of the block it belongs to and its index inside the block 查询所在区块的哈希与其在区块中的index所指定的事务Get a transaction identified by its hash 查询哈希所指定的事务Get transactions in a timestamp range 查询时间范围内的事务 'start_timestamp' and 'end_timestamp' follow the same requirements and rules as in 'GetBlocks'.Methods inherited from class io.grpc.stub.AbstractBlockingStub
newStub, newStub
Methods inherited from class io.grpc.stub.AbstractStub
getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOption, withWaitForReady
-
Method Details
-
build
protected QueryGrpc.QueryBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) - Specified by:
build
in classio.grpc.stub.AbstractStub<QueryGrpc.QueryBlockingStub>
-
getBlockByHash
Get a block identified by its hash 查询哈希所指定的区块
-
getBlocks
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
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
Get recent 'count' blocks (Only support IncludeTransactions=NONE for now) 查询最新的 'count' 个区块
-
getTransactionByHash
public QueryProto.GetTransactionByHashResponse getTransactionByHash(QueryProto.GetTransactionByHashRequest request) Get a transaction identified by its hash 查询哈希所指定的事务
-
getTransactionByBlockHashAndIndex
public 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
Get transactions in a timestamp range 查询时间范围内的事务 'start_timestamp' and 'end_timestamp' follow the same requirements and rules as in 'GetBlocks'.
-
countTransactions
public 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'.
-