Close GraphNodeFinder#findNode, if need to build a graph across modules, it is module/provider 's responsibility, who add node, who provides service to continue after this node.

This commit is contained in:
wu-sheng 2017-12-07 11:59:51 +08:00
parent 7dd4199f86
commit b4bb82656e
1 changed files with 0 additions and 19 deletions

View File

@ -30,25 +30,6 @@ public class GraphNodeFinder {
this.graph = graph;
}
/**
* Find an exist node to build the graph.
*
* @param handlerId of specific node in graph.
* @param outputClass of the found node
* @param <NODEOUTPUT> type of given output class
* @return Node instance.
*/
public <NODEOUTPUT> Node<?, NODEOUTPUT> findNode(int handlerId, Class<NODEOUTPUT> outputClass) {
ConcurrentHashMap<Integer, Node> graphNodeIndex = graph.getNodeIndex();
Node node = graphNodeIndex.get(handlerId);
if (node == null) {
throw new NodeNotFoundException("Can't find node with handlerId="
+ handlerId
+ " in graph[" + graph.getId() + "]");
}
return node;
}
public Next findNext(int handlerId) {
ConcurrentHashMap<Integer, Node> graphNodeIndex = graph.getNodeIndex();
Node node = graphNodeIndex.get(handlerId);