public void visit( NetworkNode node, Stack<NetworkNode> nodeStack, StatefulKnowledgeSessionInfo info) { info.info(this.getClass().getSimpleName() + " - Visiting " + node); DefaultNodeInfo dni = new DefaultNodeInfo(node); info.addNodeInfo(node, dni); doVisit(node, nodeStack, info); }
@Override protected void doVisit( NetworkNode node, Stack<NetworkNode> nodeStack, StatefulKnowledgeSessionInfo info) { RightInputAdapterNode an = (RightInputAdapterNode) node; DefaultNodeInfo ni = (DefaultNodeInfo) info.getNodeInfo(node); BetaNode betaNode = (BetaNode) an.getSinkPropagator().getSinks()[0]; Memory childMemory = info.getSession().getNodeMemory(betaNode); BetaMemory bm; if (betaNode.getType() == NodeTypeEnums.AccumulateNode) { bm = ((AccumulateMemory) childMemory).getBetaMemory(); } else { bm = (BetaMemory) childMemory; } ni.setMemoryEnabled(true); ni.setTupleMemorySize(bm.getRightTupleMemory().size()); ni.setCreatedFactHandles(bm.getRightTupleMemory().size()); }