Examples of DurationTimer


Examples of org.drools.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.time.impl.DurationTimer

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

        rule.setTimer( new DurationTimer( 10000 ) );
        rule.setPackage("test");
        impl.pkg.addRule(rule);

        knowledgeBase.addKnowledgePackages(Collections.singleton((KnowledgePackage) impl));
        SessionConfiguration config = new SessionConfiguration();
View Full Code Here

Examples of org.drools.time.impl.DurationTimer

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

        rule.setTimer( new DurationTimer( 10000 ) );
        rule.setPackage( "test" );
        impl.pkg.addRule( rule );

        knowledgeBase.addKnowledgePackages( Collections.singleton( (KnowledgePackage) impl ) );
        SessionConfiguration config = new SessionConfiguration();
View Full Code Here

Examples of org.drools.time.impl.DurationTimer

            public String getName() {
                return "default";
            }
        } );
               
        rule.setTimer( new DurationTimer( 10000 ) );
        rule.setPackage("test");
        impl.pkg.addRule(rule);
       
        knowledgeBase.addKnowledgePackages(Collections.singleton((KnowledgePackage) impl));
        SessionConfiguration config = new SessionConfiguration();
View Full Code Here

Examples of org.drools.time.impl.DurationTimer

            Declaration target = constraint.getRequiredDeclarations()[0];
            if ( target.isPatternDeclaration() && target.getPattern().getObjectType().isEvent() ) {
                long uplimit = ((VariableConstraint) constraint).getInterval().getUpperBound();

                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.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.time.impl.DurationTimer

            Declaration target = constraint.getRequiredDeclarations()[0];
            if ( target.isPatternDeclaration() && target.getPattern().getObjectType().isEvent() ) {
                long uplimit = ((VariableConstraint) constraint).getInterval().getUpperBound();

                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.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.time.impl.DurationTimer

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

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

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

Examples of org.drools.time.impl.DurationTimer

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

        rule.setTimer( new DurationTimer(100) );

        final PropagationContext context = new PropagationContextImpl( 0,
                                                                       PropagationContext.ASSERTION,
                                                                       null,
                                                                       null,
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.