Rename local plugin componenents list for clarity

This commit is contained in:
Ryan Ernst 2016-07-11 14:16:23 -07:00
parent 99ac65931a
commit 05ea943def
2 changed files with 8 additions and 8 deletions

View File

@ -172,17 +172,17 @@ public class TransportClient extends AbstractClient {
final TransportProxyClient proxy = new TransportProxyClient(settings, transportService, nodesService, final TransportProxyClient proxy = new TransportProxyClient(settings, transportService, nodesService,
actionModule.getActions().values().stream().map(x -> x.getAction()).collect(Collectors.toList())); 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) .filter(p -> p instanceof LifecycleComponent)
.map(p -> (LifecycleComponent)p).collect(Collectors.toList()); .map(p -> (LifecycleComponent)p).collect(Collectors.toList());
pluginLifecycles.addAll(pluginsService.getGuiceServiceClasses().stream() pluginLifecycleComponents.addAll(pluginsService.getGuiceServiceClasses().stream()
.map(injector::getInstance).collect(Collectors.toList())); .map(injector::getInstance).collect(Collectors.toList()));
resourcesToClose.addAll(pluginLifecycles); resourcesToClose.addAll(pluginLifecycleComponents);
transportService.start(); transportService.start();
transportService.acceptIncomingRequests(); transportService.acceptIncomingRequests();
TransportClient transportClient = new TransportClient(injector, pluginLifecycles, nodesService, proxy); TransportClient transportClient = new TransportClient(injector, pluginLifecycleComponents, nodesService, proxy);
resourcesToClose.clear(); resourcesToClose.clear();
return transportClient; return transportClient;
} finally { } finally {

View File

@ -324,13 +324,13 @@ public class Node implements Closeable {
); );
injector = modules.createInjector(); injector = modules.createInjector();
List<LifecycleComponent> pluginLifecycles = pluginComponents.stream() List<LifecycleComponent> pluginLifecycleComponents = pluginComponents.stream()
.filter(p -> p instanceof LifecycleComponent) .filter(p -> p instanceof LifecycleComponent)
.map(p -> (LifecycleComponent)p).collect(Collectors.toList()); .map(p -> (LifecycleComponent)p).collect(Collectors.toList());
pluginLifecycles.addAll(pluginsService.getGuiceServiceClasses().stream() pluginLifecycleComponents.addAll(pluginsService.getGuiceServiceClasses().stream()
.map(injector::getInstance).collect(Collectors.toList())); .map(injector::getInstance).collect(Collectors.toList()));
resourcesToClose.addAll(pluginLifecycles); resourcesToClose.addAll(pluginLifecycleComponents);
pluginLifecycleComponents = Collections.unmodifiableList(pluginLifecycles); this.pluginLifecycleComponents = Collections.unmodifiableList(pluginLifecycleComponents);
client.intialize(injector.getInstance(new Key<Map<GenericAction, TransportAction>>() {})); client.intialize(injector.getInstance(new Key<Map<GenericAction, TransportAction>>() {}));