Package io.grpc.util
Class OutlierDetectionLoadBalancer.OutlierDetectionPicker.ResultCountingClientStreamTracerFactory
- java.lang.Object
-
- io.grpc.ClientStreamTracer.Factory
-
- io.grpc.util.OutlierDetectionLoadBalancer.OutlierDetectionPicker.ResultCountingClientStreamTracerFactory
-
- Enclosing class:
- OutlierDetectionLoadBalancer.OutlierDetectionPicker
class OutlierDetectionLoadBalancer.OutlierDetectionPicker.ResultCountingClientStreamTracerFactory extends ClientStreamTracer.Factory
Builds instances of aClientStreamTracer
that increments the call count in the tracker for each closed stream.
-
-
Field Summary
Fields Modifier and Type Field Description private ClientStreamTracer.Factory
delegateFactory
private OutlierDetectionLoadBalancer.EndpointTracker
tracker
-
Constructor Summary
Constructors Constructor Description ResultCountingClientStreamTracerFactory(OutlierDetectionLoadBalancer.EndpointTracker tracker, ClientStreamTracer.Factory delegateFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientStreamTracer
newClientStreamTracer(ClientStreamTracer.StreamInfo info, Metadata headers)
Creates aClientStreamTracer
for a new client stream.
-
-
-
Field Detail
-
tracker
private final OutlierDetectionLoadBalancer.EndpointTracker tracker
-
delegateFactory
@Nullable private final ClientStreamTracer.Factory delegateFactory
-
-
Constructor Detail
-
ResultCountingClientStreamTracerFactory
ResultCountingClientStreamTracerFactory(OutlierDetectionLoadBalancer.EndpointTracker tracker, @Nullable ClientStreamTracer.Factory delegateFactory)
-
-
Method Detail
-
newClientStreamTracer
public ClientStreamTracer newClientStreamTracer(ClientStreamTracer.StreamInfo info, Metadata headers)
Description copied from class:ClientStreamTracer.Factory
Creates aClientStreamTracer
for a new client stream. This is called inside the transport when it's creating the stream.- Overrides:
newClientStreamTracer
in classClientStreamTracer.Factory
- Parameters:
info
- information about the streamheaders
- the mutable headers of the stream. It can be safely mutated within this method. Changes made to it will be sent by the stream. It should not be saved because it is not safe for read or write after the method returns.
-
-