Package org.apache.druid.curator
Class CuratorModule
java.lang.Object
org.apache.druid.curator.CuratorModule
- All Implemented Interfaces:
com.google.inject.Module
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(com.google.inject.Binder binder) static org.apache.curator.framework.CuratorFrameworkcreateCurator(CuratorConfig config) Create the Curator framework outside of Guice given the ZK config.Provide an instance ofDruidConnectionStateListenerfor monitoring connection state.org.apache.curator.framework.CuratorFrameworkmakeCurator(ZkEnablementConfig zkEnablementConfig, CuratorConfig config, DruidConnectionStateListener connectionStateListener, ServiceEmitter emitter, Lifecycle lifecycle) Provide the Curator framework via Guice, integrated with the Druid lifecycle.
-
Constructor Details
-
CuratorModule
public CuratorModule() -
CuratorModule
public CuratorModule(boolean haltOnFailedStart) - Parameters:
haltOnFailedStart- set to true if the JVM needs to be halted within 30 seconds of failed initialization due to unhandled curator exceptions.
-
-
Method Details
-
configure
public void configure(com.google.inject.Binder binder) - Specified by:
configurein interfacecom.google.inject.Module
-
createCurator
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, ServiceEmitter emitter, Lifecycle lifecycle) Provide the Curator framework via Guice, integrated with the Druid lifecycle. -
makeConnectionStateListener
Provide an instance ofDruidConnectionStateListenerfor monitoring connection state.
-