Package com.google.cloud.grpc
Class GcpManagedChannel.ChannelAffinityRef
java.lang.Object
com.google.cloud.grpc.GcpManagedChannel.ChannelAffinityRef
- Enclosing class:
- GcpManagedChannel
Opaque caller-owned channel reference for transaction-lifetime stickiness.
The reference remains on a draining channel until its delegate shuts down. Call useDifferentChannelOnNextCall() to move the next RPC to another active channel.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidForces the next RPC to prefer a different active channel if one is available.
-
Constructor Details
-
ChannelAffinityRef
public ChannelAffinityRef()
-
-
Method Details
-
useDifferentChannelOnNextCall
public void useDifferentChannelOnNextCall()Forces the next RPC to prefer a different active channel if one is available.
-