public class DiscoveryModule extends Object implements com.google.inject.Module
| Constructor and Description | 
|---|
DiscoveryModule()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
configure(com.google.inject.Binder binder)  | 
ServerDiscoveryFactory | 
getServerDiscoveryFactory(org.apache.curator.x.discovery.ServiceDiscovery<Void> serviceDiscovery)  | 
CuratorServiceAnnouncer | 
getServiceAnnouncer(CuratorServiceAnnouncer announcer,
                   com.google.inject.Injector injector,
                   Set<KeyHolder<DruidNode>> nodesToAnnounce,
                   Lifecycle lifecycle)  | 
org.apache.curator.x.discovery.ServiceDiscovery<Void> | 
getServiceDiscovery(org.apache.curator.framework.CuratorFramework curator,
                   CuratorDiscoveryConfig config,
                   Lifecycle lifecycle)  | 
static void | 
register(com.google.inject.Binder binder,
        Annotation annotation)
Requests that the annotated DruidNode instance be injected and published as part of the lifecycle. 
 | 
static void | 
register(com.google.inject.Binder binder,
        Class<? extends Annotation> annotation)
Requests that the annotated DruidNode instance be injected and published as part of the lifecycle. 
 | 
static void | 
registerDefault(com.google.inject.Binder binder)
Requests that the un-annotated DruidNode instance be injected and published as part of the lifecycle. 
 | 
static void | 
registerKey(com.google.inject.Binder binder,
           com.google.inject.Key<DruidNode> key)
Requests that the keyed DruidNode instance be injected and published as part of the lifecycle. 
 | 
public static void registerDefault(com.google.inject.Binder binder)
binder - the Binder to register withpublic static void register(com.google.inject.Binder binder,
                            Annotation annotation)
annotation - The annotation instance to use in finding the DruidNode instance, usually a Named annotationpublic static void register(com.google.inject.Binder binder,
                            Class<? extends Annotation> annotation)
binder - the Binder to register withannotation - The annotation class to use in finding the DruidNode instancepublic static void registerKey(com.google.inject.Binder binder,
                               com.google.inject.Key<DruidNode> key)
binder - the Binder to register withkey - The key to use in finding the DruidNode instancepublic void configure(com.google.inject.Binder binder)
configure in interface com.google.inject.Module@Provides public CuratorServiceAnnouncer getServiceAnnouncer(CuratorServiceAnnouncer announcer, com.google.inject.Injector injector, Set<KeyHolder<DruidNode>> nodesToAnnounce, Lifecycle lifecycle) throws Exception
Exception@Provides public org.apache.curator.x.discovery.ServiceDiscovery<Void> getServiceDiscovery(org.apache.curator.framework.CuratorFramework curator, CuratorDiscoveryConfig config, Lifecycle lifecycle) throws Exception
Exception@Provides public ServerDiscoveryFactory getServerDiscoveryFactory(org.apache.curator.x.discovery.ServiceDiscovery<Void> serviceDiscovery)
Copyright © 2011–2018. All rights reserved.