Examples of DurationTimer


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 >= 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 );
                    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

            }
            Arrays.sort(periodDeclrs, SortDeclarations.instance);

            declrs = new Declaration[][] { delayDeclrs, periodDeclrs };
        } else if ( timer instanceof DurationTimer ) {
            DurationTimer durTimer = ( DurationTimer ) timer;
            declrs = new Declaration[][] { new Declaration[] {durTimer.getEventFactHandleDeclaration()}, null};

        }

        context.setTupleSource( (LeftTupleSource) utils.attachNode( context,
                                context.getComponentFactory().getNodeFactoryService().buildTimerNode( context.getNextId(),
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 );
                    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

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

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

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

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

Examples of org.drools.core.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
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.