Package io.deephaven.util.grpc
Interface FailedChannelDetector.ChannelStateReader<CHANNEL,STATE>
- Type Parameters:
CHANNEL- The type ofManagedChannelfor the shadowingSTATE- The type ofConnectivityStatefor the shadowing
- Enclosing class:
- FailedChannelDetector<CHANNEL,
STATE>
public static interface FailedChannelDetector.ChannelStateReader<CHANNEL,STATE>
Class to avoid a particular import path for gRPC classes, so that
different clients can use our functionality for different shadowed
gRPC packages.
-
Method Summary
Modifier and TypeMethodDescriptionShould implement io.grpc.ManagedChannel.getStatebooleanCheck if the channel is downbooleanisShutdown(CHANNEL channel) True if the channel is shutdown.booleanisTerminated(CHANNEL channel) True if the channel is terminated.voidnotifyWhenStateChanged(CHANNEL channel, STATE state, Runnable callback) Request a notification the next time the channel changes state, should implementManagedChannel.notifyWhenStateChanged
-
Method Details
-
getState
Should implement io.grpc.ManagedChannel.getState- Parameters:
channel- the channelrequestReconnection- true to reconnect IDLE channels- Returns:
channel.getState(reconnect)
-
isDown
Check if the channel is down- Parameters:
state- a value returned bygetState- Returns:
- true if the state represents a state that is not READY for the channel
-
notifyWhenStateChanged
Request a notification the next time the channel changes state, should implementManagedChannel.notifyWhenStateChanged- Parameters:
channel- the channelstate- a state as returned bygetStatecallback- a callback to invoke on the next change of state.
-
isShutdown
True if the channel is shutdown. Should implementManagedChannel.isShutdown()- Parameters:
channel- the channel- Returns:
- true if the channel is shutdown.
-
isTerminated
True if the channel is terminated. Should implementManagedChannel.isTerminated()- Parameters:
channel- the channel- Returns:
- true if the channel is terminated.
-