Package com.google.cloud.grpc
Class GcpManagedChannel.ChannelRef
java.lang.Object
com.google.cloud.grpc.GcpManagedChannel.ChannelRef
- Enclosing class:
- GcpManagedChannel
A wrapper of real grpc channel, it provides helper functions to calculate affinity counts and
active streams count.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedChannelRef(io.grpc.ManagedChannel channel) protectedChannelRef(io.grpc.ManagedChannel channel, int affinityCount, int activeStreamsCount) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidactiveStreamsCountDecr(long startNanos, io.grpc.Status status, boolean fromClientSide) protected voidprotected voidprotected voidprotected intprotected intprotected longprotected longprotected io.grpc.ManagedChannelprotected longprotected intgetId()protected io.grpc.ConnectivityStategetState()protected voidprotected void
-
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()
-