Send feedback
Class GcpManagedChannel.ChannelRef (1.11.0)
Stay organized with collections
Save and categorize content based on your preferences.
protected class GcpManagedChannel . ChannelRef
A wrapper of real grpc channel, it provides helper functions to calculate affinity counts and
active streams count.
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()
Returns
Type
Description
int
getState()
protected ConnectivityState getState ()
Returns
Type
Description
io.grpc.ConnectivityState
isActive()
protected boolean isActive ()
messageReceived()
protected void messageReceived ()
resetAffinityCount()
protected void resetAffinityCount ()
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-06-19 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-06-19 UTC."],[],[]]