Class GcpManagedChannel.ChannelAffinityRef

java.lang.Object
com.google.cloud.grpc.GcpManagedChannel.ChannelAffinityRef
Enclosing class:
GcpManagedChannel

public static final class GcpManagedChannel.ChannelAffinityRef extends Object
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 Details

    • ChannelAffinityRef

      public ChannelAffinityRef()
  • Method Details

    • useDifferentChannelOnNextCall

      public void useDifferentChannelOnNextCall()
      Forces the next RPC to prefer a different active channel if one is available.