/**
  * Constructor specifying the unique id of the node in the Rete network, the position of the propagating <code>FactHandleImpl</code> in
  * <code>ReteTuple</code> and the source that propagates the receive <code>ReteTuple<code>s.
  *
  * @param id
  *      Unique id
  * @param source
  *      The <code>TupleSource</code> which propagates the received <code>ReteTuple</code>
  */
 public RightInputAdapterNode(
     final int id, final LeftTupleSource source, final BuildContext context) {
   super(
       id,
       context.getPartitionId(),
       context.getRuleBase().getConfiguration().isMultithreadEvaluation());
   this.tupleSource = source;
   this.tupleMemoryEnabled = context.isTupleMemoryEnabled();
 }
 /**
  * Constructus a LeftInputAdapterNode with a unique id that receives <code>FactHandle</code> from
  * a parent <code>ObjectSource</code> and adds it to a given pattern in the resulting Tuples.
  *
  * @param id The unique id of this node in the current Rete network
  * @param source The parent node, where Facts are propagated from
  */
 public LeftInputAdapterNode(final int id, final ObjectSource source, final BuildContext context) {
   super(
       id,
       context.getPartitionId(),
       context.getRuleBase().getConfiguration().isMultithreadEvaluation());
   this.objectSource = source;
   this.leftTupleMemoryEnabled = context.isTupleMemoryEnabled();
   ObjectSource current = source;
   while (!(current instanceof ObjectTypeNode)) {
     current = current.getParentObjectSource();
   }
   ObjectTypeNode otn = (ObjectTypeNode) current;
   rootQueryNode = ClassObjectType.DroolsQuery_ObjectType.isAssignableFrom(otn.getObjectType());
 }
Example #3
0
 /**
  * Construct.
  *
  * @param id The unique id for this node.
  * @param leftInput The left input <code>TupleSource</code>.
  * @param rightInput The right input <code>ObjectSource</code>.
  * @param joinNodeBinder The constraints to be applied to the right objects
  */
 public ExistsNode(
     final int id,
     final LeftTupleSource leftInput,
     final ObjectSource rightInput,
     final BetaConstraints joinNodeBinder,
     final BuildContext context) {
   super(
       id,
       context.getPartitionId(),
       context.getRuleBase().getConfiguration().isMultithreadEvaluation(),
       leftInput,
       rightInput,
       joinNodeBinder,
       context);
   this.tupleMemoryEnabled = context.isTupleMemoryEnabled();
 }
Example #4
0
 public AccumulateNode(
     final int id,
     final LeftTupleSource leftInput,
     final ObjectSource rightInput,
     final AlphaNodeFieldConstraint[] resultConstraints,
     final BetaConstraints sourceBinder,
     final BetaConstraints resultBinder,
     final Accumulate accumulate,
     final boolean unwrapRightObject,
     final BuildContext context) {
   super(
       id,
       context.getPartitionId(),
       context.getRuleBase().getConfiguration().isMultithreadEvaluation(),
       leftInput,
       rightInput,
       sourceBinder,
       context);
   this.resultBinder = resultBinder;
   this.resultConstraints = resultConstraints;
   this.accumulate = accumulate;
   this.unwrapRightObject = unwrapRightObject;
   this.tupleMemoryEnabled = context.isTupleMemoryEnabled();
 }