Package com.google.api.gax.tracing
Class TracedOperationCallable<RequestT,ResponseT,MetadataT>
java.lang.Object
com.google.api.gax.rpc.OperationCallable<RequestT,ResponseT,MetadataT>
com.google.api.gax.tracing.TracedOperationCallable<RequestT,ResponseT,MetadataT>
@InternalApi("For internal use by google-cloud-java clients only")
public class TracedOperationCallable<RequestT,ResponseT,MetadataT>
extends OperationCallable<RequestT,ResponseT,MetadataT>
-
Constructor Summary
ConstructorDescriptionTracedOperationCallable
(OperationCallable<RequestT, ResponseT, MetadataT> innerCallable, ApiTracerFactory tracerFactory, SpanName spanName) -
Method Summary
Modifier and TypeMethodDescriptioncancel
(String operationName, ApiCallContext context) Wrap operation cancellation in aApiTracerFactory.OperationType.Unary
trace.futureCall
(RequestT request, ApiCallContext context) Wrap the initial start polling logical operations in a single parent trace using aApiTracerFactory.OperationType.LongRunning
ApiTracer
.resumeFutureCall
(String operationName, ApiCallContext context) Wrap the polling logical operations in a single parent trace using aApiTracerFactory.OperationType.LongRunning
ApiTracer
.Methods inherited from class com.google.api.gax.rpc.OperationCallable
call, call, cancel, futureCall, resumeFutureCall, withDefaultCallContext
-
Constructor Details
-
TracedOperationCallable
public TracedOperationCallable(@Nonnull OperationCallable<RequestT, ResponseT, MetadataT> innerCallable, @Nonnull ApiTracerFactory tracerFactory, @Nonnull SpanName spanName)
-
-
Method Details
-
futureCall
Wrap the initial start polling logical operations in a single parent trace using aApiTracerFactory.OperationType.LongRunning
ApiTracer
.- Specified by:
futureCall
in classOperationCallable<RequestT,
ResponseT, MetadataT> - Parameters:
request
- The request to initiate the operation.context
-ApiCallContext
to make the call with- Returns:
OperationFuture
for the call result
-
resumeFutureCall
public OperationFuture<ResponseT,MetadataT> resumeFutureCall(String operationName, ApiCallContext context) Wrap the polling logical operations in a single parent trace using aApiTracerFactory.OperationType.LongRunning
ApiTracer
.- Specified by:
resumeFutureCall
in classOperationCallable<RequestT,
ResponseT, MetadataT> - Parameters:
operationName
- The name of the operation to resume.context
-ApiCallContext
to make the call with- Returns:
OperationFuture
for the call result.
-
cancel
Wrap operation cancellation in aApiTracerFactory.OperationType.Unary
trace.- Specified by:
cancel
in classOperationCallable<RequestT,
ResponseT, MetadataT> - Parameters:
operationName
- The name of the operation to cancel.context
-ApiCallContext
to make the call with- Returns:
- the future which completes once the operation is canceled on the server side.
-