Package com.google.api.gax.tracing
Class TracedUnaryCallable<RequestT,ResponseT>
- java.lang.Object
-
- com.google.api.gax.rpc.UnaryCallable<RequestT,ResponseT>
-
- com.google.api.gax.tracing.TracedUnaryCallable<RequestT,ResponseT>
-
- Direct Known Subclasses:
TracedOperationInitialCallable
@BetaApi("The surface for tracing is not stable and might change in the future") @InternalApi("For internal use by google-cloud-java clients only") public class TracedUnaryCallable<RequestT,ResponseT> extends UnaryCallable<RequestT,ResponseT>
This callable wraps a callable chain in aApiTracer
.For internal use only.
-
-
Constructor Summary
Constructors Constructor Description TracedUnaryCallable(UnaryCallable<RequestT,ResponseT> innerCallable, ApiTracerFactory tracerFactory, SpanName spanName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.api.core.ApiFuture<ResponseT>
futureCall(RequestT request, ApiCallContext context)
Calls the wrappedUnaryCallable
within the context of a new trace.-
Methods inherited from class com.google.api.gax.rpc.UnaryCallable
call, call, futureCall, withDefaultCallContext
-
-
-
-
Constructor Detail
-
TracedUnaryCallable
public TracedUnaryCallable(UnaryCallable<RequestT,ResponseT> innerCallable, ApiTracerFactory tracerFactory, SpanName spanName)
-
-
Method Detail
-
futureCall
public com.google.api.core.ApiFuture<ResponseT> futureCall(RequestT request, ApiCallContext context)
Calls the wrappedUnaryCallable
within the context of a new trace.- Specified by:
futureCall
in classUnaryCallable<RequestT,ResponseT>
- Parameters:
request
- the request to send.context
-ApiCallContext
to make the call with.- Returns:
ApiFuture
for the call result
-
-