Package org.drools.core.common

Examples of org.drools.core.common.PropagationContextImpl


        SlidingLengthWindowContext window = (SlidingLengthWindowContext) context;
        window.pos = (window.pos + 1) % window.handles.length;
        if ( window.handles[window.pos] != null ) {
            final EventFactHandle previous = window.handles[window.pos];
            // retract previous
            final PropagationContext pctx = new PropagationContextImpl( workingMemory.getNextPropagationIdCounter(),
                                                                                      PropagationContext.EXPIRATION,
                                                                                      null,
                                                                                      null,
                                                                                      previous );
            WindowTupleList list = (WindowTupleList) memory.events.get( previous );
            //for( RightTuple tuple = list.getFirstWindowTuple(); tuple != null; tuple = list.getFirstWindowTuple() ) {
            for( WindowTuple tuple = list.getFirstWindowTuple(); tuple != null) {
                WindowTuple next = tuple.getWindowNext();
                tuple.setPropagationContext(pctx);
                tuple.getRightTupleSink().retractRightTuple(tuple,
                                                            pctx,
                                                            workingMemory);
                pctx.evaluateActionQueue(workingMemory);
                //tuple.unlinkFromRightParent();
                tuple = next;
            }
//            Commented out, for phreak development
//            for( WindowTuple tuple = list.getFirstWindowTuple(); tuple != null;  ) {
View Full Code Here


                                                 handle ) ) {
                queue.expiringHandle = handle;
                queue.queue.remove();
                if( handle.isValid()) {
                    // if not expired yet, expire it
                    final PropagationContext pctx = new PropagationContextImpl( workingMemory.getNextPropagationIdCounter(),
                                                                                              PropagationContext.EXPIRATION,
                                                                                              null,
                                                                                              null,
                                                                                              handle );
                    WindowTupleList list = (WindowTupleList) memory.events.get( handle );
                    for( WindowTuple tuple = list.getFirstWindowTuple(); tuple != null) {
                        WindowTuple next = tuple.getWindowNext();
                        tuple.setPropagationContext( pctx );
                        tuple.getRightTupleSink().retractRightTuple( tuple,
                                                                     pctx,
                                                                     workingMemory );
                        pctx.evaluateActionQueue( workingMemory );
                        //tuple.unlinkFromRightParent();
                        tuple = next;
                    }
                }
                queue.expiringHandle = null;
View Full Code Here

TOP

Related Classes of org.drools.core.common.PropagationContextImpl

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.