Package org.apache.druid.curator
Class DruidConnectionStateListener
java.lang.Object
org.apache.druid.java.util.metrics.AbstractMonitor
org.apache.druid.curator.DruidConnectionStateListener
- All Implemented Interfaces:
org.apache.curator.framework.state.ConnectionStateListener,Monitor
public class DruidConnectionStateListener
extends AbstractMonitor
implements org.apache.curator.framework.state.ConnectionStateListener
Curator
ConnectionStateListener that uses a ServiceEmitter to send alerts on ZK connection loss,
and emit metrics about ZK connection status.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandoMonitor(ServiceEmitter emitter) booleanvoidstateChanged(org.apache.curator.framework.CuratorFramework curatorFramework, org.apache.curator.framework.state.ConnectionState newState) Methods inherited from class org.apache.druid.java.util.metrics.AbstractMonitor
isStarted, monitor, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.curator.framework.state.ConnectionStateListener
doNotProxy
-
Constructor Details
-
DruidConnectionStateListener
-
-
Method Details
-
stateChanged
public void stateChanged(org.apache.curator.framework.CuratorFramework curatorFramework, org.apache.curator.framework.state.ConnectionState newState) - Specified by:
stateChangedin interfaceorg.apache.curator.framework.state.ConnectionStateListener
-
isConnected
public boolean isConnected() -
doMonitor
- Specified by:
doMonitorin classAbstractMonitor
-