Package io.grpc.rls
Class SubchannelStateManagerImpl
java.lang.Object
io.grpc.rls.SubchannelStateManagerImpl
- All Implemented Interfaces:
SubchannelStateManager
Implementation of
SubchannelStateManager
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ConnectivityState
private final HashMap
<String, ConnectivityState> private final com.google.common.collect.Multiset
<ConnectivityState> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns representative subchannel status from all registered subchannels.Returns current subchannel state for given subchannel name if exists, otherwise returnsnull
.toString()
void
updateState
(String name, ConnectivityState newState) Registers and updates state for given subchannel.
-
Field Details
-
stateMap
-
stateMultiset
-
currentState
-
-
Constructor Details
-
SubchannelStateManagerImpl
SubchannelStateManagerImpl()
-
-
Method Details
-
updateState
Description copied from interface:SubchannelStateManager
Registers and updates state for given subchannel.ConnectivityState.SHUTDOWN
unregisters the subchannel.- Specified by:
updateState
in interfaceSubchannelStateManager
-
getState
Description copied from interface:SubchannelStateManager
Returns current subchannel state for given subchannel name if exists, otherwise returnsnull
.- Specified by:
getState
in interfaceSubchannelStateManager
-
getAggregatedState
Description copied from interface:SubchannelStateManager
Returns representative subchannel status from all registered subchannels.- Specified by:
getAggregatedState
in interfaceSubchannelStateManager
-
toString
-