Drools :: Core 6.0.0.Beta5

org.drools.core.phreak
Class SegmentUtilities

java.lang.Object
  extended by org.drools.core.phreak.SegmentUtilities

public class SegmentUtilities
extends Object


Constructor Summary
SegmentUtilities()
           
 
Method Summary
static SegmentMemory createChildSegment(InternalWorkingMemory wm, LeftTupleSink sink, Memory memory)
           
static void createChildSegments(InternalWorkingMemory wm, SegmentMemory smem, LeftTupleSinkPropagator sinkProp)
           
static SegmentMemory createSegmentMemory(LeftTupleSource tupleSource, InternalWorkingMemory wm)
          Initialises the NodeSegment memory for all nodes in the segment.
static LeftInputAdapterNode getQueryLiaNode(String queryName, ObjectTypeNode queryOtn)
           
static ObjectTypeNode getQueryOtn(LeftTupleSource lts)
           
static SegmentMemory getQuerySegmentMemory(InternalWorkingMemory wm, LeftTupleSource segmentRoot, QueryElementNode queryNode)
           
static void initialiseRtnMemory(LeftTupleSource lt, InternalWorkingMemory wm, List<PathMemory> pmems)
           
static boolean inSubNetwork(RightInputAdapterNode riaNode, LeftTupleSource leftTupleSource)
          Is the LeftTupleSource a node in the sub network for the RightInputAdapterNode To be in the same network, it must be a node is after the two output of the parent and before the rianode.
static boolean parentInSameSegment(LeftTupleSource lt, Rule removingRule)
           
static void updateRiaAndTerminalMemory(LeftTupleSource lt, LeftTupleSource originalLt, SegmentMemory smem, InternalWorkingMemory wm)
          This adds the segment memory to the terminal node or ria node's list of memories.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SegmentUtilities

public SegmentUtilities()
Method Detail

createSegmentMemory

public static SegmentMemory createSegmentMemory(LeftTupleSource tupleSource,
                                                InternalWorkingMemory wm)
Initialises the NodeSegment memory for all nodes in the segment.

Parameters:
wm -

getQuerySegmentMemory

public static SegmentMemory getQuerySegmentMemory(InternalWorkingMemory wm,
                                                  LeftTupleSource segmentRoot,
                                                  QueryElementNode queryNode)

createChildSegments

public static void createChildSegments(InternalWorkingMemory wm,
                                       SegmentMemory smem,
                                       LeftTupleSinkPropagator sinkProp)

createChildSegment

public static SegmentMemory createChildSegment(InternalWorkingMemory wm,
                                               LeftTupleSink sink,
                                               Memory memory)

inSubNetwork

public static boolean inSubNetwork(RightInputAdapterNode riaNode,
                                   LeftTupleSource leftTupleSource)
Is the LeftTupleSource a node in the sub network for the RightInputAdapterNode To be in the same network, it must be a node is after the two output of the parent and before the rianode.

Parameters:
riaNode -
leftTupleSource -
Returns:

updateRiaAndTerminalMemory

public static void updateRiaAndTerminalMemory(LeftTupleSource lt,
                                              LeftTupleSource originalLt,
                                              SegmentMemory smem,
                                              InternalWorkingMemory wm)
This adds the segment memory to the terminal node or ria node's list of memories. In the case of the terminal node this allows it to know that all segments from the tip to root are linked. In the case of the ria node its all the segments up to the start of the subnetwork. This is because the rianode only cares if all of it's segments are linked, then it sets the bit of node it is the right input for.

Parameters:
lt -
originalLt -
smem -
wm -

initialiseRtnMemory

public static void initialiseRtnMemory(LeftTupleSource lt,
                                       InternalWorkingMemory wm,
                                       List<PathMemory> pmems)

parentInSameSegment

public static boolean parentInSameSegment(LeftTupleSource lt,
                                          Rule removingRule)

getQueryOtn

public static ObjectTypeNode getQueryOtn(LeftTupleSource lts)

getQueryLiaNode

public static LeftInputAdapterNode getQueryLiaNode(String queryName,
                                                   ObjectTypeNode queryOtn)

Drools :: Core 6.0.0.Beta5

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.