Interface ConnectionStateListener
-
- All Known Implementing Classes:
CircuitBreakingConnectionStateListener
public interface ConnectionStateListener
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleandoNotDecorate()Normally, ConnectionStateListeners are decorated via the configuredConnectionStateListenerDecorator.voidstateChanged(CuratorFramework client, ConnectionState newState)Called when there is a state change in the connection
-
-
-
Method Detail
-
stateChanged
void stateChanged(CuratorFramework client, ConnectionState newState)
Called when there is a state change in the connection- Parameters:
client- the clientnewState- the new state
-
doNotDecorate
default boolean doNotDecorate()
Normally, ConnectionStateListeners are decorated via the configuredConnectionStateListenerDecorator. For certain critical cases, however, this is not desired. If your listener returnstruefor doNotDecorate(), it will not be passed through the decorator.- Returns:
- true/false
-
-