Class GcpManagedChannel.ChannelRef (1.11.0)

protected class GcpManagedChannel.ChannelRef

A wrapper of real grpc channel, it provides helper functions to calculate affinity counts and active streams count.

Inheritance

java.lang.Object > GcpManagedChannel.ChannelRef

Constructors

ChannelRef(ManagedChannel channel)

protected ChannelRef(ManagedChannel channel)
Parameter
Name Description
channel io.grpc.ManagedChannel

ChannelRef(ManagedChannel channel, int affinityCount, int activeStreamsCount)

protected ChannelRef(ManagedChannel channel, int affinityCount, int activeStreamsCount)
Parameters
Name Description
channel io.grpc.ManagedChannel
affinityCount int
activeStreamsCount int

Methods

activeStreamsCountDecr(long startNanos, Status status, boolean fromClientSide)

protected void activeStreamsCountDecr(long startNanos, Status status, boolean fromClientSide)
Parameters
Name Description
startNanos long
status io.grpc.Status
fromClientSide boolean

activeStreamsCountIncr()

protected void activeStreamsCountIncr()

affinityCountDecr()

protected void affinityCountDecr()

affinityCountIncr()

protected void affinityCountIncr()

getActiveStreamsCount()

protected int getActiveStreamsCount()
Returns
Type Description
int

getAffinityCount()

protected int getAffinityCount()
Returns
Type Description
int

getAndResetErrCalls()

protected long getAndResetErrCalls()
Returns
Type Description
long

getAndResetOkCalls()

protected long getAndResetOkCalls()
Returns
Type Description
long

getChannel()

protected ManagedChannel getChannel()
Returns
Type Description
io.grpc.ManagedChannel

getConnectedSinceNanos()

protected long getConnectedSinceNanos()
Returns
Type Description
long

getId()

protected int getId()
Returns
Type Description
int

getState()

protected ConnectivityState getState()
Returns
Type Description
io.grpc.ConnectivityState

isActive()

protected boolean isActive()
Returns
Type Description
boolean

messageReceived()

protected void messageReceived()

resetAffinityCount()

protected void resetAffinityCount()