Package org.drools.util

Examples of org.drools.util.ObjectHashSet


        Map<ObjectType, ObjectTypeNode> obnodes = defaultEntryPointNode.getObjectTypeNodes();

        ObjectType key = new ClassObjectType( DroolsQuery.class );
        ObjectTypeNode droolsQueryNode = obnodes.get( key );
        ObjectHashSet droolsQueryMemory = (ObjectHashSet) abstractWorkingMemory.getNodeMemory( droolsQueryNode );
        assertEquals( 0,
                      droolsQueryMemory.size() );

        Entry[] entries = droolsQueryMemory.getTable();
        int entryCounter = 0;
        for ( Entry entry : entries ) {
            if ( entry != null ) {
                entryCounter++;
                ObjectEntry oEntry = (ObjectEntry) entry;
View Full Code Here


            // we do this after the shadowproxy update, just so that its up to date for the future
            return;
        }

        if (this.objectMemoryEnabled) {
            final ObjectHashSet memory = (ObjectHashSet) workingMemory.getNodeMemory(this);
            memory.add(factHandle,
                    false);
        }
        if (compiledNetwork != null) {
            compiledNetwork.assertObject(factHandle, context, workingMemory);
        } else {
View Full Code Here

        if (context.getType() == PropagationContext.MODIFICATION && this.skipOnModify && context.getDormantActivations() == 0) {
            return;
        }

        if (this.objectMemoryEnabled) {
            final ObjectHashSet memory = (ObjectHashSet) workingMemory.getNodeMemory(this);
            memory.remove(factHandle);
        }

        for (RightTuple rightTuple = factHandle.getRightTuple(); rightTuple != null; rightTuple = (RightTuple) rightTuple.getHandleNext()) {
            rightTuple.getRightTupleSink().retractRightTuple(rightTuple,
                    context,
View Full Code Here

    }

    public void updateSink(final ObjectSink sink,
                           final PropagationContext context,
                           final InternalWorkingMemory workingMemory) {
        final ObjectHashSet memory = (ObjectHashSet) workingMemory.getNodeMemory(this);
        Iterator it = memory.iterator();
        for (ObjectEntry entry = (ObjectEntry) it.next(); entry != null; entry = (ObjectEntry) it.next()) {
            sink.assertObject((InternalFactHandle) entry.getValue(),
                    context,
                    workingMemory);
        }
View Full Code Here

     * Creates memory for the node using PrimitiveLongMap as its optimised for storage and reteivals of Longs.
     * However PrimitiveLongMap is not ideal for spase data. So it should be monitored incase its more optimal
     * to switch back to a standard HashMap.
     */
    public Object createMemory(final RuleBaseConfiguration config) {
        return new ObjectHashSet();
    }
View Full Code Here

        this.classLoader = new MapBackedClassLoader( this.config.getClassLoader() );
        this.packageClassLoader.addClassLoader( this.classLoader );
        this.pkgs = new HashMap();
        this.processes = new HashMap();
        this.globals = new HashMap();
        this.statefulSessions = new ObjectHashSet();
    this.objenesis = createObjenesis();
  }
View Full Code Here

        this.globals = (Map) childStream.readObject();

        this.eventSupport = (RuleBaseEventSupport) childStream.readObject();
        this.eventSupport.setRuleBase( this );

        this.statefulSessions = new ObjectHashSet();

        for ( int i = 0, length = objects.length; i < length; i++ ) {
            objects[i] = childStream.readObject();
        }
    }
View Full Code Here

TOP

Related Classes of org.drools.util.ObjectHashSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.