Class GcpManagedChannel.ChannelRef

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

protected class GcpManagedChannel.ChannelRef extends Object
A wrapper of real grpc channel, it provides helper functions to calculate affinity counts and active streams count.
  • Constructor Details

    • ChannelRef

      protected ChannelRef(io.grpc.ManagedChannel channel)
    • ChannelRef

      protected ChannelRef(io.grpc.ManagedChannel channel, int affinityCount, int activeStreamsCount)
  • Method Details

    • getConnectedSinceNanos

      protected long getConnectedSinceNanos()
    • getState

      protected io.grpc.ConnectivityState getState()
    • getChannel

      protected io.grpc.ManagedChannel getChannel()
    • getId

      protected int getId()
    • affinityCountIncr

      protected void affinityCountIncr()
    • affinityCountDecr

      protected void affinityCountDecr()
    • resetAffinityCount

      protected void resetAffinityCount()
    • activeStreamsCountIncr

      protected void activeStreamsCountIncr()
    • activeStreamsCountDecr

      protected void activeStreamsCountDecr(long startNanos, io.grpc.Status status, boolean fromClientSide)
    • messageReceived

      protected void messageReceived()
    • getAffinityCount

      protected int getAffinityCount()
    • getActiveStreamsCount

      protected int getActiveStreamsCount()
    • getAndResetOkCalls

      protected long getAndResetOkCalls()
    • getAndResetErrCalls

      protected long getAndResetErrCalls()