Package org.apache.druid.curator
Class CuratorModule
- java.lang.Object
-
- org.apache.druid.curator.CuratorModule
-
- All Implemented Interfaces:
com.google.inject.Module
public class CuratorModule extends Object implements com.google.inject.Module
-
-
Constructor Summary
Constructors Constructor Description CuratorModule()CuratorModule(boolean haltOnFailedStart)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(com.google.inject.Binder binder)static org.apache.curator.framework.CuratorFrameworkcreateCurator(CuratorConfig config)Create the Curator framework outside of Guice given the ZK config.DruidConnectionStateListenermakeConnectionStateListener(org.apache.druid.java.util.emitter.service.ServiceEmitter emitter)Provide an instance ofDruidConnectionStateListenerfor monitoring connection state.org.apache.curator.framework.CuratorFrameworkmakeCurator(ZkEnablementConfig zkEnablementConfig, CuratorConfig config, DruidConnectionStateListener connectionStateListener, org.apache.druid.java.util.emitter.service.ServiceEmitter emitter, org.apache.druid.java.util.common.lifecycle.Lifecycle lifecycle)Provide the Curator framework via Guice, integrated with the Druid lifecycle.
-
-
-
Method Detail
-
configure
public void configure(com.google.inject.Binder binder)
- Specified by:
configurein interfacecom.google.inject.Module
-
createCurator
public static org.apache.curator.framework.CuratorFramework createCurator(CuratorConfig config)
Create the Curator framework outside of Guice given the ZK config. Primarily for tests.
-
makeCurator
@Provides public org.apache.curator.framework.CuratorFramework makeCurator(ZkEnablementConfig zkEnablementConfig, CuratorConfig config, DruidConnectionStateListener connectionStateListener, org.apache.druid.java.util.emitter.service.ServiceEmitter emitter, org.apache.druid.java.util.common.lifecycle.Lifecycle lifecycle)
Provide the Curator framework via Guice, integrated with the Druid lifecycle.
-
makeConnectionStateListener
@Provides public DruidConnectionStateListener makeConnectionStateListener(org.apache.druid.java.util.emitter.service.ServiceEmitter emitter)
Provide an instance ofDruidConnectionStateListenerfor monitoring connection state.
-
-