Plugin node modules/services rename to guice related
See elastic/elasticsearchelastic/elasticsearch#19371 Original commit: elastic/x-pack-elasticsearch@40f7e43cc5
This commit is contained in:
parent
87ea79bad6
commit
e92860f552
|
@ -42,12 +42,12 @@ public class Graph extends Plugin implements ActionPlugin {
|
|||
return XPackPlugin.featureEnabled(settings, NAME, true);
|
||||
}
|
||||
|
||||
public Collection<Module> nodeModules() {
|
||||
public Collection<Module> createGuiceModules() {
|
||||
return Collections.singletonList(new GraphModule(enabled, transportClientMode));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Class<? extends LifecycleComponent>> nodeServices() {
|
||||
public Collection<Class<? extends LifecycleComponent>> getGuiceServiceClasses() {
|
||||
if (enabled == false|| transportClientMode) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ public class TransportFilterTests extends ESIntegTestCase {
|
|||
|
||||
public static class InternalPlugin extends Plugin {
|
||||
@Override
|
||||
public Collection<Module> nodeModules() {
|
||||
public Collection<Module> createGuiceModules() {
|
||||
return Collections.singletonList(new TestTransportFilterModule());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ public class XPackPlugin extends Plugin implements ScriptPlugin, ActionPlugin {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Collection<Module> nodeModules() {
|
||||
public Collection<Module> createGuiceModules() {
|
||||
ArrayList<Module> modules = new ArrayList<>();
|
||||
modules.add(b -> b.bind(Clock.class).toInstance(getClock()));
|
||||
modules.addAll(notification.nodeModules());
|
||||
|
@ -148,7 +148,7 @@ public class XPackPlugin extends Plugin implements ScriptPlugin, ActionPlugin {
|
|||
modules.addAll(security.nodeModules());
|
||||
modules.addAll(watcher.nodeModules());
|
||||
modules.addAll(monitoring.nodeModules());
|
||||
modules.addAll(graph.nodeModules());
|
||||
modules.addAll(graph.createGuiceModules());
|
||||
|
||||
if (transportClientMode == false) {
|
||||
modules.add(new HttpClientModule());
|
||||
|
@ -158,14 +158,14 @@ public class XPackPlugin extends Plugin implements ScriptPlugin, ActionPlugin {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Collection<Class<? extends LifecycleComponent>> nodeServices() {
|
||||
public Collection<Class<? extends LifecycleComponent>> getGuiceServiceClasses() {
|
||||
ArrayList<Class<? extends LifecycleComponent>> services = new ArrayList<>();
|
||||
services.addAll(notification.nodeServices());
|
||||
services.addAll(licensing.nodeServices());
|
||||
services.addAll(security.nodeServices());
|
||||
services.addAll(watcher.nodeServices());
|
||||
services.addAll(monitoring.nodeServices());
|
||||
services.addAll(graph.nodeServices());
|
||||
services.addAll(graph.getGuiceServiceClasses());
|
||||
return services;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue