Class CuratorModule

  • All Implemented Interfaces:
    com.google.inject.Module

    public class CuratorModule
    extends Object
    implements com.google.inject.Module
    • Constructor Detail

      • 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 Detail

      • configure

        public void configure​(com.google.inject.Binder binder)
        Specified by:
        configure in interface com.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.