Examples of DurationTimer


Examples of org.drools.core.time.impl.DurationTimer

        assertEquals(0,
                     agenda.getFocus().size());

        rule1.setNoLoop(false);
        rule2.setTimer(new DurationTimer(5000));

        node1.assertLeftTuple(tuple1,
                              context1,
                              workingMemory);
View Full Code Here

Examples of org.drools.core.time.impl.DurationTimer

            public String getName() {
                return "default";
            }
        });

        rule.setTimer(new DurationTimer(100));

        final PropagationContext context = pctxFactory.createPropagationContext(0,
                                                                                PropagationContext.INSERTION,
                                                                                null,
                                                                                null,
View Full Code Here

Examples of org.drools.core.time.impl.DurationTimer

        final RuleTerminalNodeLeftTuple tuple1 = new RuleTerminalNodeLeftTuple(new DefaultFactHandle(1,
                                                                                                     "cheese"),
                                                                               node,
                                                                               true);
        rule.setTimer(new DurationTimer(50));

        node.assertLeftTuple(tuple1,
                             context1,
                             workingMemory);
View Full Code Here

Examples of org.drools.core.time.impl.DurationTimer

                                                           rule,
                                                           rule.getLhs(),
                                                           0,
                                                           buildContext);

        rule.setTimer(new DurationTimer(100));
        rule.setNoLoop(true);

        // add consequence
        rule.setConsequence(new org.drools.core.spi.Consequence() {
            private static final long serialVersionUID = 510l;
View Full Code Here

Examples of org.drools.core.time.impl.DurationTimer

            if ( target.isPatternDeclaration() && target.getPattern().getObjectType().isEvent() ) {
                long uplimit = ((IntervalProviderConstraint) constraint).getInterval().getUpperBound();
                // only makes sense to add the new timer if the uplimit is not infinity (Long.MAX_VALUE)
                if( uplimit >= 0 && uplimit < Long.MAX_VALUE ) {
                    Timer timer = context.getRule().getTimer();
                    DurationTimer durationTimer = new DurationTimer( uplimit );
                    durationTimer.setEventFactHandle(target);

                    if ( timer instanceof CompositeMaxDurationTimer ) {
                        // already a composite so just add
                        ((CompositeMaxDurationTimer) timer).addDurationTimer( durationTimer );
                    } else {
View Full Code Here

Examples of org.drools.core.time.impl.DurationTimer

            if ( target.isPatternDeclaration() && target.getPattern().getObjectType().isEvent() ) {
                long uplimit = ((IntervalProviderConstraint) constraint).getInterval().getUpperBound();
                // only makes sense to add the new timer if the uplimit is not infinity (Long.MAX_VALUE)
                if( uplimit < Long.MAX_VALUE ) {
                    Timer timer = context.getRule().getTimer();
                    DurationTimer durationTimer = new DurationTimer( uplimit );

                    if ( timer instanceof CompositeMaxDurationTimer ) {
                        // already a composite so just add
                        ((CompositeMaxDurationTimer) timer).addDurationTimer( durationTimer );
                    } else {
View Full Code Here

Examples of org.drools.core.time.impl.DurationTimer

        assertEquals(0,
                     agenda.getFocus().size());

        rule1.setNoLoop(false);
        rule2.setTimer(new DurationTimer(5000));

        node1.assertLeftTuple(tuple1,
                              context1,
                              ksession);
View Full Code Here

Examples of org.drools.core.time.impl.DurationTimer

            public String getName() {
                return "default";
            }
        });

        rule.setTimer(new DurationTimer(100));

        final PropagationContext context = pctxFactory.createPropagationContext(0,
                                                                                PropagationContext.INSERTION,
                                                                                null,
                                                                                null,
View Full Code Here

Examples of org.drools.core.time.impl.DurationTimer

        final RuleTerminalNodeLeftTuple tuple1 = new RuleTerminalNodeLeftTuple(new DefaultFactHandle(1,
                                                                                                     "cheese"),
                                                                               node,
                                                                               true);
        rule.setTimer(new DurationTimer(50));

        node.assertLeftTuple(tuple1,
                             context1,
                             ksession);
View Full Code Here

Examples of org.drools.core.time.impl.DurationTimer

                                                           rule,
                                                           rule.getLhs(),
                                                           0,
                                                           buildContext);

        rule.setTimer(new DurationTimer(100));
        rule.setNoLoop(true);

        // add consequence
        rule.setConsequence(new org.drools.core.spi.Consequence() {
            private static final long serialVersionUID = 510l;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.