Search in sources :

Example 1 with TupleIndexHashTable

use of org.drools.core.util.index.TupleIndexHashTable in project drools by kiegroup.

the class IndexingTest method testFullFastIteratorResume.

@Test(timeout = 10000)
public void testFullFastIteratorResume() throws Exception {
    String str = "";
    str += "package org.drools.compiler.test  \n";
    str += "import org.drools.compiler.Person \n";
    str += "query peeps( String $name, int $age ) \n";
    str += "    not $p2 : Person( $name := name, age > $age ) \n";
    str += "end\n";
    KieBase kbase = loadKnowledgeBaseFromString(str);
    List<ObjectTypeNode> nodes = ((KnowledgeBaseImpl) kbase).getRete().getObjectTypeNodes();
    ObjectTypeNode node = null;
    for (ObjectTypeNode n : nodes) {
        if (((ClassObjectType) n.getObjectType()).getClassType() == DroolsQuery.class) {
            node = n;
            break;
        }
    }
    StatefulKnowledgeSessionImpl wm = ((StatefulKnowledgeSessionImpl) kbase.newKieSession());
    AlphaNode alphanode = (AlphaNode) node.getObjectSinkPropagator().getSinks()[0];
    LeftInputAdapterNode liaNode = (LeftInputAdapterNode) alphanode.getObjectSinkPropagator().getSinks()[0];
    NotNode n = (NotNode) liaNode.getSinkPropagator().getSinks()[0];
    DoubleNonIndexSkipBetaConstraints c = (DoubleNonIndexSkipBetaConstraints) n.getRawConstraints();
    // assertEquals( "$name", ((VariableConstraint)c.getConstraint()).getRequiredDeclarations()[0].getIdentifier() );
    assertTrue(c.isIndexed());
    BetaMemory bm = (BetaMemory) wm.getNodeMemory(n);
    System.out.println(bm.getLeftTupleMemory().getClass());
    System.out.println(bm.getRightTupleMemory().getClass());
    assertTrue(bm.getLeftTupleMemory() instanceof TupleIndexHashTable);
    assertTrue(bm.getRightTupleMemory() instanceof TupleIndexHashTable);
    final Map<String, Integer> map = new HashMap<String, Integer>();
    map.put("inserted", new Integer(0));
    map.put("deleted", new Integer(0));
    map.put("updated", new Integer(0));
    wm.openLiveQuery("peeps", new Object[] { Variable.v, 99 }, new ViewChangedEventListener() {

        @Override
        public void rowInserted(Row row) {
        }

        @Override
        public void rowDeleted(Row row) {
        }

        @Override
        public void rowUpdated(Row row) {
        }
    });
    Map<String, InternalFactHandle> peeps = new HashMap<String, InternalFactHandle>();
    Person p = new Person("x0", 100);
    InternalFactHandle fh = (InternalFactHandle) wm.insert(p);
    peeps.put(p.getName(), fh);
    for (int i = 1; i < 100; i++) {
        p = new Person("x" + i, 101);
        fh = (InternalFactHandle) wm.insert(p);
        wm.fireAllRules();
        peeps.put(p.getName(), fh);
    }
    List<RightTuple> list = new ArrayList<RightTuple>(100);
    FastIterator it = n.getRightIterator(bm.getRightTupleMemory());
    for (RightTuple rt = n.getFirstRightTuple(null, bm.getRightTupleMemory(), null, it); rt != null; rt = (RightTuple) it.next(rt)) {
        list.add(rt);
    }
    assertEquals(100, list.size());
    // check we can resume from each entry in the list above.
    for (int i = 0; i < 100; i++) {
        RightTuple rightTuple = list.get(i);
        // resumes from the current rightTuple
        it = n.getRightIterator(bm.getRightTupleMemory(), rightTuple);
        int j = i + 1;
        for (RightTuple rt = (RightTuple) it.next(rightTuple); rt != null; rt = (RightTuple) it.next(rt)) {
            assertSame(list.get(j), rt);
            j++;
        }
    }
}
Also used : NotNode(org.drools.core.reteoo.NotNode) HashMap(java.util.HashMap) ObjectTypeNode(org.drools.core.reteoo.ObjectTypeNode) ArrayList(java.util.ArrayList) DoubleNonIndexSkipBetaConstraints(org.drools.core.common.DoubleNonIndexSkipBetaConstraints) KieBase(org.kie.api.KieBase) FastIterator(org.drools.core.util.FastIterator) InternalFactHandle(org.drools.core.common.InternalFactHandle) BetaMemory(org.drools.core.reteoo.BetaMemory) TupleIndexHashTable(org.drools.core.util.index.TupleIndexHashTable) AlphaNode(org.drools.core.reteoo.AlphaNode) RightTuple(org.drools.core.reteoo.RightTuple) IndexableConstraint(org.drools.core.rule.IndexableConstraint) ViewChangedEventListener(org.kie.api.runtime.rule.ViewChangedEventListener) StatefulKnowledgeSessionImpl(org.drools.core.impl.StatefulKnowledgeSessionImpl) Row(org.kie.api.runtime.rule.Row) Person(org.drools.compiler.Person) LeftInputAdapterNode(org.drools.core.reteoo.LeftInputAdapterNode) Test(org.junit.Test)

Example 2 with TupleIndexHashTable

use of org.drools.core.util.index.TupleIndexHashTable in project drools by kiegroup.

the class IndexingTest method testIndexingOnQueryUnification.

@Test(timeout = 10000)
public void testIndexingOnQueryUnification() throws Exception {
    String str = "";
    str += "package org.drools.compiler.test  \n";
    str += "import org.drools.compiler.Person \n";
    str += "query peeps( String $name, String $likes, String $street) \n";
    str += "    $p : Person( $name := name, $likes := likes, $street := address.street ) \n";
    str += "end\n";
    KieBase kbase = loadKnowledgeBaseFromString(str);
    List<ObjectTypeNode> nodes = ((KnowledgeBaseImpl) kbase).getRete().getObjectTypeNodes();
    ObjectTypeNode node = null;
    for (ObjectTypeNode n : nodes) {
        if (((ClassObjectType) n.getObjectType()).getClassType() == DroolsQuery.class) {
            node = n;
            break;
        }
    }
    InternalWorkingMemory wm = ((StatefulKnowledgeSessionImpl) kbase.newKieSession());
    AlphaNode alphanode = (AlphaNode) node.getObjectSinkPropagator().getSinks()[0];
    LeftInputAdapterNode liaNode = (LeftInputAdapterNode) alphanode.getObjectSinkPropagator().getSinks()[0];
    // $p2
    JoinNode j = (JoinNode) liaNode.getSinkPropagator().getSinks()[0];
    TripleNonIndexSkipBetaConstraints c = (TripleNonIndexSkipBetaConstraints) j.getRawConstraints();
    // assertEquals( "$name", ((VariableConstraint)c.getConstraint()).getRequiredDeclarations()[0].getIdentifier() );
    assertTrue(c.isIndexed());
    BetaMemory bm = (BetaMemory) wm.getNodeMemory(j);
    assertTrue(bm.getLeftTupleMemory() instanceof TupleIndexHashTable);
    assertTrue(bm.getRightTupleMemory() instanceof TupleIndexHashTable);
}
Also used : InternalWorkingMemory(org.drools.core.common.InternalWorkingMemory) TripleNonIndexSkipBetaConstraints(org.drools.core.common.TripleNonIndexSkipBetaConstraints) KieBase(org.kie.api.KieBase) JoinNode(org.drools.core.reteoo.JoinNode) ObjectTypeNode(org.drools.core.reteoo.ObjectTypeNode) BetaMemory(org.drools.core.reteoo.BetaMemory) TupleIndexHashTable(org.drools.core.util.index.TupleIndexHashTable) AlphaNode(org.drools.core.reteoo.AlphaNode) LeftInputAdapterNode(org.drools.core.reteoo.LeftInputAdapterNode) Test(org.junit.Test)

Example 3 with TupleIndexHashTable

use of org.drools.core.util.index.TupleIndexHashTable in project drools by kiegroup.

the class IndexingTest method testBuildsIndexedMemory.

@Test(timeout = 10000)
public void testBuildsIndexedMemory() {
    // tests indexes are correctly built
    String drl = "";
    drl += "package org.drools.compiler.test\n";
    drl += "import org.drools.compiler.Person\n";
    drl += "global java.util.List list\n";
    drl += "rule test1\n";
    drl += "when\n";
    drl += "   $p1  : Person($name : name )\n";
    // indexed
    drl += "   $p2 : Person(name == $name)\n";
    // indexed
    drl += "   $p3 : Person(name == $p1.name)\n";
    // not indexed
    drl += "   $p4 : Person(address.street == $p1.address.street)\n";
    // indexed
    drl += "   $p5 : Person(address.street == $p1.name)\n";
    // drl += "   $p6 : Person( $name == name)\n"; // not indexed and won't compile
    // indexed
    drl += "   $p7 : Person(addresses[\"key\"].street == $p1.name)\n";
    // indexed
    drl += "   $p8 : Person(addresses[0].street == $p1.name)\n";
    // not indexed
    drl += "   $p9 : Person(name == $p1.address.street)\n";
    // indexed
    drl += "   $p10 : Person(addresses[0].street + 'xx' == $p1.name)\n";
    // not indexed
    drl += "   $p11 : Person(addresses[$p1].street == $p1.name)\n";
    drl += "then\n";
    drl += "end\n";
    KieBase kbase = loadKnowledgeBaseFromString(drl);
    ObjectTypeNode node = getObjectTypeNode(kbase, Person.class);
    InternalWorkingMemory wm = ((StatefulKnowledgeSessionImpl) kbase.newKieSession());
    LeftInputAdapterNode liaNode = (LeftInputAdapterNode) node.getObjectSinkPropagator().getSinks()[0];
    // $p2
    JoinNode j2 = (JoinNode) liaNode.getSinkPropagator().getSinks()[0];
    // $p3
    JoinNode j3 = (JoinNode) j2.getSinkPropagator().getSinks()[0];
    // $p4
    JoinNode j4 = (JoinNode) j3.getSinkPropagator().getSinks()[0];
    // $p5
    JoinNode j5 = (JoinNode) j4.getSinkPropagator().getSinks()[0];
    // JoinNode j6 = ( JoinNode ) j5.getSinkPropagator().getSinks()[0];  // $p6 // won't compile
    // $p7
    JoinNode j7 = (JoinNode) j5.getSinkPropagator().getSinks()[0];
    // $p8
    JoinNode j8 = (JoinNode) j7.getSinkPropagator().getSinks()[0];
    // $p9
    JoinNode j9 = (JoinNode) j8.getSinkPropagator().getSinks()[0];
    // $p10
    JoinNode j10 = (JoinNode) j9.getSinkPropagator().getSinks()[0];
    // $p11
    JoinNode j11 = (JoinNode) j10.getSinkPropagator().getSinks()[0];
    SingleBetaConstraints c = (SingleBetaConstraints) j2.getRawConstraints();
    assertEquals("$name", ((IndexableConstraint) c.getConstraint()).getFieldIndex().getDeclaration().getIdentifier());
    assertTrue(c.isIndexed());
    BetaMemory bm = (BetaMemory) wm.getNodeMemory(j2);
    assertTrue(bm.getLeftTupleMemory() instanceof TupleIndexHashTable);
    assertTrue(bm.getRightTupleMemory() instanceof TupleIndexHashTable);
    c = (SingleBetaConstraints) j3.getRawConstraints();
    assertEquals("name", ((IndexableConstraint) c.getConstraint()).getFieldIndex().getDeclaration().getIdentifier());
    assertTrue(c.isIndexed());
    bm = (BetaMemory) wm.getNodeMemory(j3);
    assertTrue(bm.getLeftTupleMemory() instanceof TupleIndexHashTable);
    assertTrue(bm.getRightTupleMemory() instanceof TupleIndexHashTable);
    c = (SingleBetaConstraints) j4.getRawConstraints();
    assertEquals("$p1", c.getConstraint().getRequiredDeclarations()[0].getIdentifier());
    assertFalse(c.isIndexed());
    bm = (BetaMemory) wm.getNodeMemory(j4);
    assertTrue(bm.getLeftTupleMemory() instanceof TupleList);
    assertTrue(bm.getRightTupleMemory() instanceof TupleList);
    c = (SingleBetaConstraints) j5.getRawConstraints();
    assertEquals("name", ((IndexableConstraint) c.getConstraint()).getFieldIndex().getDeclaration().getIdentifier());
    assertTrue(c.isIndexed());
    bm = (BetaMemory) wm.getNodeMemory(j5);
    assertTrue(bm.getLeftTupleMemory() instanceof TupleIndexHashTable);
    assertTrue(bm.getRightTupleMemory() instanceof TupleIndexHashTable);
    // won't compile
    // c = ( SingleBetaConstraints ) j6.getRawConstraints();
    // assertEquals( "name", ((VariableConstraint)c.getConstraint()).getRequiredDeclarations()[0].getIdentifier() );
    // assertFalse( c.isIndexed() );
    // bm = ( BetaMemory ) wm.getNodeMemory( j6 );
    // assertTrue( bm.getLeftTupleMemory() instanceof LeftTupleList );
    // assertTrue( bm.getRightTupleMemory() instanceof RightTupleList );
    c = (SingleBetaConstraints) j7.getRawConstraints();
    assertEquals("name", ((IndexableConstraint) c.getConstraint()).getFieldIndex().getDeclaration().getIdentifier());
    assertTrue(c.isIndexed());
    bm = (BetaMemory) wm.getNodeMemory(j7);
    assertTrue(bm.getLeftTupleMemory() instanceof TupleIndexHashTable);
    assertTrue(bm.getRightTupleMemory() instanceof TupleIndexHashTable);
    c = (SingleBetaConstraints) j8.getRawConstraints();
    assertEquals("name", ((IndexableConstraint) c.getConstraint()).getFieldIndex().getDeclaration().getIdentifier());
    assertTrue(c.isIndexed());
    bm = (BetaMemory) wm.getNodeMemory(j8);
    assertTrue(bm.getLeftTupleMemory() instanceof TupleIndexHashTable);
    assertTrue(bm.getRightTupleMemory() instanceof TupleIndexHashTable);
    c = (SingleBetaConstraints) j9.getRawConstraints();
    assertEquals("$p1", c.getConstraint().getRequiredDeclarations()[0].getIdentifier());
    assertFalse(c.isIndexed());
    bm = (BetaMemory) wm.getNodeMemory(j9);
    assertTrue(bm.getLeftTupleMemory() instanceof TupleList);
    assertTrue(bm.getRightTupleMemory() instanceof TupleList);
    c = (SingleBetaConstraints) j10.getRawConstraints();
    assertEquals("name", ((IndexableConstraint) c.getConstraint()).getFieldIndex().getDeclaration().getIdentifier());
    assertTrue(c.isIndexed());
    bm = (BetaMemory) wm.getNodeMemory(j10);
    assertTrue(bm.getLeftTupleMemory() instanceof TupleIndexHashTable);
    assertTrue(bm.getRightTupleMemory() instanceof TupleIndexHashTable);
    c = (SingleBetaConstraints) j11.getRawConstraints();
    assertEquals("$p1", c.getConstraint().getRequiredDeclarations()[0].getIdentifier());
    assertFalse(c.isIndexed());
    bm = (BetaMemory) wm.getNodeMemory(j11);
    assertTrue(bm.getLeftTupleMemory() instanceof TupleList);
    assertTrue(bm.getRightTupleMemory() instanceof TupleList);
}
Also used : InternalWorkingMemory(org.drools.core.common.InternalWorkingMemory) TupleList(org.drools.core.util.index.TupleList) SingleBetaConstraints(org.drools.core.common.SingleBetaConstraints) KieBase(org.kie.api.KieBase) JoinNode(org.drools.core.reteoo.JoinNode) ObjectTypeNode(org.drools.core.reteoo.ObjectTypeNode) BetaMemory(org.drools.core.reteoo.BetaMemory) TupleIndexHashTable(org.drools.core.util.index.TupleIndexHashTable) LeftInputAdapterNode(org.drools.core.reteoo.LeftInputAdapterNode) Test(org.junit.Test)

Example 4 with TupleIndexHashTable

use of org.drools.core.util.index.TupleIndexHashTable in project drools by kiegroup.

the class RightTupleIndexHashTableIteratorTest method test1.

@Test
public void test1() {
    BetaNodeFieldConstraint constraint0 = getConstraint("d", Operator.EQUAL, "this", Foo.class);
    BetaNodeFieldConstraint[] constraints = new BetaNodeFieldConstraint[] { constraint0 };
    RuleBaseConfiguration config = new RuleBaseConfiguration();
    BetaConstraints betaConstraints = null;
    betaConstraints = new SingleBetaConstraints(constraints, config);
    BetaMemory betaMemory = betaConstraints.createBetaMemory(config, NodeTypeEnums.JoinNode);
    KieBase kBase = KnowledgeBaseFactory.newKnowledgeBase();
    KieSession ss = kBase.newKieSession();
    InternalFactHandle fh1 = (InternalFactHandle) ss.insert(new Foo("brie", 1));
    InternalFactHandle fh2 = (InternalFactHandle) ss.insert(new Foo("brie", 1));
    InternalFactHandle fh3 = (InternalFactHandle) ss.insert(new Foo("soda", 1));
    InternalFactHandle fh4 = (InternalFactHandle) ss.insert(new Foo("soda", 1));
    InternalFactHandle fh5 = (InternalFactHandle) ss.insert(new Foo("bread", 3));
    InternalFactHandle fh6 = (InternalFactHandle) ss.insert(new Foo("bread", 3));
    InternalFactHandle fh7 = (InternalFactHandle) ss.insert(new Foo("cream", 3));
    InternalFactHandle fh8 = (InternalFactHandle) ss.insert(new Foo("gorda", 15));
    InternalFactHandle fh9 = (InternalFactHandle) ss.insert(new Foo("beer", 16));
    InternalFactHandle fh10 = (InternalFactHandle) ss.insert(new Foo("mars", 0));
    InternalFactHandle fh11 = (InternalFactHandle) ss.insert(new Foo("snicker", 0));
    InternalFactHandle fh12 = (InternalFactHandle) ss.insert(new Foo("snicker", 0));
    InternalFactHandle fh13 = (InternalFactHandle) ss.insert(new Foo("snicker", 0));
    betaMemory.getRightTupleMemory().add(new RightTupleImpl(fh1, null));
    betaMemory.getRightTupleMemory().add(new RightTupleImpl(fh2, null));
    betaMemory.getRightTupleMemory().add(new RightTupleImpl(fh3, null));
    betaMemory.getRightTupleMemory().add(new RightTupleImpl(fh4, null));
    betaMemory.getRightTupleMemory().add(new RightTupleImpl(fh5, null));
    betaMemory.getRightTupleMemory().add(new RightTupleImpl(fh6, null));
    betaMemory.getRightTupleMemory().add(new RightTupleImpl(fh7, null));
    betaMemory.getRightTupleMemory().add(new RightTupleImpl(fh8, null));
    betaMemory.getRightTupleMemory().add(new RightTupleImpl(fh9, null));
    TupleIndexHashTable hashTable = (TupleIndexHashTable) betaMemory.getRightTupleMemory();
    // can't create a 0 hashCode, so forcing
    TupleList rightTupleList = new TupleList();
    rightTupleList.add(new RightTupleImpl(fh10, null));
    hashTable.getTable()[0] = rightTupleList;
    rightTupleList = new TupleList();
    rightTupleList.add(new RightTupleImpl(fh11, null));
    rightTupleList.add(new RightTupleImpl(fh12, null));
    rightTupleList.add(new RightTupleImpl(fh13, null));
    ((TupleList) hashTable.getTable()[0]).setNext(rightTupleList);
    Entry[] table = hashTable.getTable();
    List list = new ArrayList();
    for (int i = 0; i < table.length; i++) {
        if (table[i] != null) {
            List entries = new ArrayList();
            entries.add(i);
            Entry entry = table[i];
            while (entry != null) {
                entries.add(entry);
                entry = entry.getNext();
            }
            list.add(entries.toArray());
        }
    }
    assertEquals(5, list.size());
    Object[] entries = (Object[]) list.get(0);
    assertEquals(0, entries[0]);
    assertEquals(3, entries.length);
    entries = (Object[]) list.get(1);
    assertEquals(102, entries[0]);
    assertEquals(2, entries.length);
    entries = (Object[]) list.get(2);
    assertEquals(103, entries[0]);
    assertEquals(2, entries.length);
    entries = (Object[]) list.get(3);
    assertEquals(115, entries[0]);
    assertEquals(3, entries.length);
    entries = (Object[]) list.get(4);
    assertEquals(117, entries[0]);
    assertEquals(3, entries.length);
    // System.out.println( entries );
    list = new ArrayList<LeftTupleImpl>();
    Iterator it = betaMemory.getRightTupleMemory().iterator();
    for (RightTuple rightTuple = (RightTuple) it.next(); rightTuple != null; rightTuple = (RightTuple) it.next()) {
        list.add(rightTuple);
    }
    assertEquals(13, list.size());
}
Also used : SingleBetaConstraints(org.drools.core.common.SingleBetaConstraints) BetaConstraints(org.drools.core.common.BetaConstraints) SingleBetaConstraints(org.drools.core.common.SingleBetaConstraints) ArrayList(java.util.ArrayList) BetaMemory(org.drools.core.reteoo.BetaMemory) RightTupleImpl(org.drools.core.reteoo.RightTupleImpl) TupleIndexHashTable(org.drools.core.util.index.TupleIndexHashTable) BetaNodeFieldConstraint(org.drools.core.spi.BetaNodeFieldConstraint) RightTuple(org.drools.core.reteoo.RightTuple) BetaNodeFieldConstraint(org.drools.core.spi.BetaNodeFieldConstraint) RuleBaseConfiguration(org.drools.core.RuleBaseConfiguration) TupleList(org.drools.core.util.index.TupleList) KieBase(org.kie.api.KieBase) FieldIndexHashTableFullIterator(org.drools.core.util.index.TupleIndexHashTable.FieldIndexHashTableFullIterator) LeftTupleImpl(org.drools.core.reteoo.LeftTupleImpl) KieSession(org.kie.api.runtime.KieSession) ArrayList(java.util.ArrayList) TupleList(org.drools.core.util.index.TupleList) List(java.util.List) InternalFactHandle(org.drools.core.common.InternalFactHandle) Test(org.junit.Test)

Example 5 with TupleIndexHashTable

use of org.drools.core.util.index.TupleIndexHashTable in project drools by kiegroup.

the class RightTupleIndexHashTableTest method testSingleEntry.

@Test
public void testSingleEntry() throws Exception {
    final InternalReadAccessor extractor = store.getReader(Cheese.class, "type");
    final Pattern pattern = new Pattern(0, new ClassObjectType(Cheese.class));
    final Declaration declaration = new Declaration("typeOfCheese", extractor, pattern);
    final FieldIndex fieldIndex = new FieldIndex(extractor, declaration, MvelConstraint.INDEX_EVALUATOR);
    final TupleIndexHashTable map = new TupleIndexHashTable(new FieldIndex[] { fieldIndex }, false);
    final Cheese cheddar = new Cheese("cheddar", 10);
    final InternalFactHandle cheddarHandle1 = new DefaultFactHandle(0, cheddar);
    assertEquals(0, map.size());
    assertNull(map.getFirst(new LeftTupleImpl(cheddarHandle1, null, true)));
    final Cheese stilton1 = new Cheese("stilton", 35);
    RightTuple stiltonRighTuple = new RightTupleImpl(new DefaultFactHandle(1, stilton1), null);
    map.add(stiltonRighTuple);
    assertEquals(1, map.size());
    assertEquals(1, tablePopulationSize(map));
    final Cheese stilton2 = new Cheese("stilton", 80);
    final InternalFactHandle stiltonHandle2 = new DefaultFactHandle(2, stilton2);
    final Tuple tuple = map.getFirst(new LeftTupleImpl(stiltonHandle2, null, true));
    assertSame(stiltonRighTuple.getFactHandle(), tuple.getFactHandle());
    assertNull(tuple.getNext());
}
Also used : Pattern(org.drools.core.rule.Pattern) FieldIndex(org.drools.core.util.AbstractHashTable.FieldIndex) ClassObjectType(org.drools.core.base.ClassObjectType) Cheese(org.drools.core.test.model.Cheese) RightTupleImpl(org.drools.core.reteoo.RightTupleImpl) TupleIndexHashTable(org.drools.core.util.index.TupleIndexHashTable) RightTuple(org.drools.core.reteoo.RightTuple) DefaultFactHandle(org.drools.core.common.DefaultFactHandle) InternalReadAccessor(org.drools.core.spi.InternalReadAccessor) LeftTupleImpl(org.drools.core.reteoo.LeftTupleImpl) Declaration(org.drools.core.rule.Declaration) InternalFactHandle(org.drools.core.common.InternalFactHandle) RightTuple(org.drools.core.reteoo.RightTuple) Tuple(org.drools.core.spi.Tuple) Test(org.junit.Test)

Aggregations

TupleIndexHashTable (org.drools.core.util.index.TupleIndexHashTable)16 Test (org.junit.Test)15 InternalFactHandle (org.drools.core.common.InternalFactHandle)10 FieldIndex (org.drools.core.util.AbstractHashTable.FieldIndex)8 ClassObjectType (org.drools.core.base.ClassObjectType)7 BetaMemory (org.drools.core.reteoo.BetaMemory)7 LeftTupleImpl (org.drools.core.reteoo.LeftTupleImpl)7 RightTuple (org.drools.core.reteoo.RightTuple)7 RightTupleImpl (org.drools.core.reteoo.RightTupleImpl)7 Declaration (org.drools.core.rule.Declaration)7 Pattern (org.drools.core.rule.Pattern)7 InternalReadAccessor (org.drools.core.spi.InternalReadAccessor)7 TupleList (org.drools.core.util.index.TupleList)7 ArrayList (java.util.ArrayList)6 DefaultFactHandle (org.drools.core.common.DefaultFactHandle)6 Cheese (org.drools.core.test.model.Cheese)6 KieBase (org.kie.api.KieBase)5 LeftInputAdapterNode (org.drools.core.reteoo.LeftInputAdapterNode)4 ObjectTypeNode (org.drools.core.reteoo.ObjectTypeNode)4 RuleBaseConfiguration (org.drools.core.RuleBaseConfiguration)3