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
Constructors Constructor Description TracedOperationCallable(OperationCallable<RequestT,ResponseT,MetadataT> innerCallable, ApiTracerFactory tracerFactory, SpanName spanName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.api.core.ApiFuture<java.lang.Void>cancel(java.lang.String operationName, ApiCallContext context)Wrap operation cancellation in aApiTracerFactory.OperationType.Unarytrace.OperationFuture<ResponseT,MetadataT>futureCall(RequestT request, ApiCallContext context)Wrap the initial start polling logical operations in a single parent trace using aApiTracerFactory.OperationType.LongRunningApiTracer.OperationFuture<ResponseT,MetadataT>resumeFutureCall(java.lang.String operationName, ApiCallContext context)Wrap the polling logical operations in a single parent trace using aApiTracerFactory.OperationType.LongRunningApiTracer.-
Methods inherited from class com.google.api.gax.rpc.OperationCallable
call, call, cancel, futureCall, resumeFutureCall, withDefaultCallContext
-
-
-
-
Constructor Detail
-
TracedOperationCallable
public TracedOperationCallable(@Nonnull OperationCallable<RequestT,ResponseT,MetadataT> innerCallable, @Nonnull ApiTracerFactory tracerFactory, @Nonnull SpanName spanName)
-
-
Method Detail
-
futureCall
public OperationFuture<ResponseT,MetadataT> futureCall(RequestT request, ApiCallContext context)
Wrap the initial start polling logical operations in a single parent trace using aApiTracerFactory.OperationType.LongRunningApiTracer.- Specified by:
futureCallin classOperationCallable<RequestT,ResponseT,MetadataT>- Parameters:
request- The request to initiate the operation.context-ApiCallContextto make the call with- Returns:
OperationFuturefor the call result
-
resumeFutureCall
public OperationFuture<ResponseT,MetadataT> resumeFutureCall(java.lang.String operationName, ApiCallContext context)
Wrap the polling logical operations in a single parent trace using aApiTracerFactory.OperationType.LongRunningApiTracer.- Specified by:
resumeFutureCallin classOperationCallable<RequestT,ResponseT,MetadataT>- Parameters:
operationName- The name of the operation to resume.context-ApiCallContextto make the call with- Returns:
OperationFuturefor the call result.
-
cancel
public com.google.api.core.ApiFuture<java.lang.Void> cancel(java.lang.String operationName, ApiCallContext context)Wrap operation cancellation in aApiTracerFactory.OperationType.Unarytrace.- Specified by:
cancelin classOperationCallable<RequestT,ResponseT,MetadataT>- Parameters:
operationName- The name of the operation to cancel.context-ApiCallContextto make the call with- Returns:
- the future which completes once the operation is canceled on the server side.
-
-