Class RetryAndTraceDatastoreRpcDecorator (2.14.1)

public class RetryAndTraceDatastoreRpcDecorator implements DatastoreRpc

An implementation of DatastoreRpc which acts as a Decorator and decorates the underlying DatastoreRpc with the logic of retry and Traceability.

Inheritance

java.lang.Object > RetryAndTraceDatastoreRpcDecorator

Implements

DatastoreRpc

Constructors

RetryAndTraceDatastoreRpcDecorator(DatastoreRpc datastoreRpc, TraceUtil traceUtil, RetrySettings retrySettings, DatastoreOptions datastoreOptions)

public RetryAndTraceDatastoreRpcDecorator(DatastoreRpc datastoreRpc, TraceUtil traceUtil, RetrySettings retrySettings, DatastoreOptions datastoreOptions)
Parameters
NameDescription
datastoreRpcDatastoreRpc
traceUtilTraceUtil
retrySettingsRetrySettings
datastoreOptionsDatastoreOptions

Methods

<O>invokeRpc(Callable<O> block, String startSpan)

public O <O>invokeRpc(Callable<O> block, String startSpan)
Parameters
NameDescription
blockCallable<O>
startSpanString
Returns
TypeDescription
O

allocateIds(AllocateIdsRequest request)

public AllocateIdsResponse allocateIds(AllocateIdsRequest request)

Sends an allocate IDs request.

Parameter
NameDescription
requestAllocateIdsRequest
Returns
TypeDescription
AllocateIdsResponse

beginTransaction(BeginTransactionRequest request)

public BeginTransactionResponse beginTransaction(BeginTransactionRequest request)

Sends a begin transaction request.

Parameter
NameDescription
requestBeginTransactionRequest
Returns
TypeDescription
BeginTransactionResponse
Exceptions
TypeDescription
DatastoreException

commit(CommitRequest request)

public CommitResponse commit(CommitRequest request)

Sends a commit request.

Parameter
NameDescription
requestCommitRequest
Returns
TypeDescription
CommitResponse

lookup(LookupRequest request)

public LookupResponse lookup(LookupRequest request)

Sends a lookup request.

Parameter
NameDescription
requestLookupRequest
Returns
TypeDescription
LookupResponse

reserveIds(ReserveIdsRequest request)

public ReserveIdsResponse reserveIds(ReserveIdsRequest request)

Sends a reserveIds request.

Parameter
NameDescription
requestReserveIdsRequest
Returns
TypeDescription
ReserveIdsResponse

rollback(RollbackRequest request)

public RollbackResponse rollback(RollbackRequest request)

Sends a rollback request.

Parameter
NameDescription
requestRollbackRequest
Returns
TypeDescription
RollbackResponse

runAggregationQuery(RunAggregationQueryRequest request)

public RunAggregationQueryResponse runAggregationQuery(RunAggregationQueryRequest request)

Sends a request to run an aggregation query.

Parameter
NameDescription
requestRunAggregationQueryRequest
Returns
TypeDescription
RunAggregationQueryResponse

runQuery(RunQueryRequest request)

public RunQueryResponse runQuery(RunQueryRequest request)

Sends a request to run a query.

Parameter
NameDescription
requestRunQueryRequest
Returns
TypeDescription
RunQueryResponse