Package org.drools.reteoo

Examples of org.drools.reteoo.WindowNode$WindowMemory


     */
    public void build(BuildContext context,
                      BuildUtils utils,
                      RuleConditionElement rce) {
        final WindowReference window = (WindowReference) rce;
        final WindowNode node = context.getRuleBase().getReteooBuilder().getWindowNode( window.getName() );
       
        context.setObjectSource( node );
        context.setCurrentEntryPoint( node.getEntryPoint() );
     }
View Full Code Here


                                  pattern );
        }
       
        if( ! behaviors.isEmpty() ) {
            // build the window node:
            WindowNode wn = new WindowNode( context.getNextId(),
                                            alphaConstraints,
                                            behaviors,
                                            context.getObjectSource(),
                                            context );
            context.setObjectSource( (WindowNode) utils.attachNode( context,
View Full Code Here

                addLeftTupleSink( ruleBase,
                                  leftTupleSink,
                                  nodes );
            }
        } else if ( sink instanceof WindowNode ) {
            WindowNode node = (WindowNode) sink;
            nodes.put( sink.getId(), ((BaseNode)sink) );
            for ( ObjectSink objectSink : node.getSinkPropagator().getSinks() ) {
                addObjectSink(ruleBase, objectSink, nodes);
            }
        } else {
            ObjectSource node = ( ObjectSource ) sink;
            for ( ObjectSink objectSink : node.getSinkPropagator().getSinks() ) {
                addObjectSink( ruleBase,
                               objectSink,
                               nodes );
            }
        }
View Full Code Here

    }
   
    public static class BehaviorJobContextTimerInputMarshaller implements TimersInputMarshaller {
        public void read(MarshallerReaderContext inCtx) throws IOException, ClassNotFoundException {
            int sinkId = inCtx.readInt();
            WindowNode windowNode = (WindowNode) inCtx.sinks.get( sinkId );
           
            WindowMemory memory = (WindowMemory) inCtx.wm.getNodeMemory( windowNode );      
           
            Object[] behaviorContext = ( Object[]  ) memory.behaviorContext;
           
View Full Code Here

            this.context = context;
        }

        public BehaviorExpireWMAction(MarshallerReaderContext inCtx) throws IOException {
            nodeId = inCtx.readInt();
            WindowNode windowNode = (WindowNode) inCtx.sinks.get( nodeId );
           
            memory = (WindowMemory) inCtx.wm.getNodeMemory( windowNode );      
           
            Object[] behaviorContext = ( Object[]  ) memory.behaviorContext;
           
            int i = inCtx.readInt();
           
            this.behavior = (SlidingTimeWindow) windowNode.getBehaviors()[i];
            this.context =  ( SlidingTimeWindowContext ) behaviorContext[i];          
        }
View Full Code Here

        }
       
        public BehaviorExpireWMAction(MarshallerReaderContext context,
                                      Action _action) {
            nodeId =_action.getBehaviorExpire().getNodeId();
            WindowNode windowNode = (WindowNode) context.sinks.get( nodeId );
           
            memory = (WindowMemory) context.wm.getNodeMemory( windowNode );      
           
            Object[] behaviorContext = ( Object[]  ) memory.behaviorContext;
           
            int i = 0; //  <==== this needs fixing
           
            this.behavior = (SlidingTimeWindow) windowNode.getBehaviors()[i];
            this.context =  ( SlidingTimeWindowContext ) behaviorContext[i];          
        }
View Full Code Here

                                  pattern );
        }
       
        if( ! behaviors.isEmpty() ) {
            // build the window node:
            WindowNode wn = new WindowNode( context.getNextId(),
                                            alphaConstraints,
                                            behaviors,
                                            context.getObjectSource(),
                                            context );
            context.setObjectSource( (WindowNode) utils.attachNode( context,
View Full Code Here

     */
    public void build(BuildContext context,
                      BuildUtils utils,
                      RuleConditionElement rce) {
        final WindowReference window = (WindowReference) rce;
        final WindowNode node = context.getRuleBase().getReteooBuilder().getWindowNode( window.getName() );
       
        context.setObjectSource( node );
        context.setCurrentEntryPoint( node.getEntryPoint() );
     }
View Full Code Here

                                  pattern );
        }
       
        if( ! behaviors.isEmpty() ) {
            // build the window node:
            WindowNode wn = new WindowNode( context.getNextId(),
                                            alphaConstraints,
                                            behaviors,
                                            context.getObjectSource(),
                                            context );
            context.setObjectSource( (WindowNode) utils.attachNode( context,
View Full Code Here

    }
   
    public static class BehaviorJobContextTimerInputMarshaller implements TimersInputMarshaller {
        public void read(MarshallerReaderContext inCtx) throws IOException, ClassNotFoundException {
            int sinkId = inCtx.readInt();
            WindowNode windowNode = (WindowNode) inCtx.sinks.get( sinkId );
           
            WindowMemory memory = (WindowMemory) inCtx.wm.getNodeMemory( windowNode );      
           
            Object[] behaviorContext = ( Object[]  ) memory.behaviorContext;
           
View Full Code Here

TOP

Related Classes of org.drools.reteoo.WindowNode$WindowMemory

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.