Class GcpManagedChannel.ChannelAffinityRef (1.17.0)

public static final class GcpManagedChannel.ChannelAffinityRef

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.

Inheritance

java.lang.Object > GcpManagedChannel.ChannelAffinityRef

Constructors

ChannelAffinityRef()

public ChannelAffinityRef()

Methods

useDifferentChannelOnNextCall()

public void useDifferentChannelOnNextCall()

Forces the next RPC to prefer a different active channel if one is available.