Rename local plugin componenents list for clarity
This commit is contained in:
parent
99ac65931a
commit
05ea943def
|
@ -172,17 +172,17 @@ public class TransportClient extends AbstractClient {
|
|||
final TransportProxyClient proxy = new TransportProxyClient(settings, transportService, nodesService,
|
||||
actionModule.getActions().values().stream().map(x -> x.getAction()).collect(Collectors.toList()));
|
||||
|
||||
List<LifecycleComponent> pluginLifecycles = pluginComponents.stream()
|
||||
List<LifecycleComponent> pluginLifecycleComponents = pluginComponents.stream()
|
||||
.filter(p -> p instanceof LifecycleComponent)
|
||||
.map(p -> (LifecycleComponent)p).collect(Collectors.toList());
|
||||
pluginLifecycles.addAll(pluginsService.getGuiceServiceClasses().stream()
|
||||
pluginLifecycleComponents.addAll(pluginsService.getGuiceServiceClasses().stream()
|
||||
.map(injector::getInstance).collect(Collectors.toList()));
|
||||
resourcesToClose.addAll(pluginLifecycles);
|
||||
resourcesToClose.addAll(pluginLifecycleComponents);
|
||||
|
||||
transportService.start();
|
||||
transportService.acceptIncomingRequests();
|
||||
|
||||
TransportClient transportClient = new TransportClient(injector, pluginLifecycles, nodesService, proxy);
|
||||
TransportClient transportClient = new TransportClient(injector, pluginLifecycleComponents, nodesService, proxy);
|
||||
resourcesToClose.clear();
|
||||
return transportClient;
|
||||
} finally {
|
||||
|
|
|
@ -324,13 +324,13 @@ public class Node implements Closeable {
|
|||
);
|
||||
injector = modules.createInjector();
|
||||
|
||||
List<LifecycleComponent> pluginLifecycles = pluginComponents.stream()
|
||||
List<LifecycleComponent> pluginLifecycleComponents = pluginComponents.stream()
|
||||
.filter(p -> p instanceof LifecycleComponent)
|
||||
.map(p -> (LifecycleComponent)p).collect(Collectors.toList());
|
||||
pluginLifecycles.addAll(pluginsService.getGuiceServiceClasses().stream()
|
||||
pluginLifecycleComponents.addAll(pluginsService.getGuiceServiceClasses().stream()
|
||||
.map(injector::getInstance).collect(Collectors.toList()));
|
||||
resourcesToClose.addAll(pluginLifecycles);
|
||||
pluginLifecycleComponents = Collections.unmodifiableList(pluginLifecycles);
|
||||
resourcesToClose.addAll(pluginLifecycleComponents);
|
||||
this.pluginLifecycleComponents = Collections.unmodifiableList(pluginLifecycleComponents);
|
||||
|
||||
client.intialize(injector.getInstance(new Key<Map<GenericAction, TransportAction>>() {}));
|
||||
|
||||
|
|
Loading…
Reference in New Issue