Package org.drools.time.impl

Examples of org.drools.time.impl.Timer


            return true;
        }

        final Rule rule = rtn.getRule();
        AgendaItem item;
        final Timer timer = rule.getTimer();
        if ( timer != null ) {
            if ( reuseActivation ) {
                item = ( AgendaItem ) tuple.getObject();  
                item.setPropagationContext( context );
            } else {
View Full Code Here


        if ( this.rule.isNoLoop() && this.rule.equals( context.getRuleOrigin() ) ) {
            agenda.increaseDormantActivations();
            return;
        }

        final Timer timer = this.rule.getTimer();

        if ( timer != null ) {
            final ScheduledAgendaItem item = agenda.createScheduledAgendaItem( tuple,
                                                                               context,
                                                                               this );
View Full Code Here

        if ( this.rule.isNoLoop() && this.rule.equals( context.getRuleOrigin() ) ) {
            agenda.increaseDormantActivations();
            return;
        }

        final Timer timer = this.rule.getTimer();

        if ( timer != null ) {
            if ( item == null ) {
                item = agenda.createScheduledAgendaItem( leftTuple,
                                                         context,
View Full Code Here

            // variable constraints always require a single declaration
            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 );
View Full Code Here

            repeatLimit = Integer.parseInt( timerString.substring( equalsPos + 1, p ).trim() );
        }
                    
        String body = timerString.substring( colonPos + 1, optionsPos ).trim();
       
        Timer timer = null;
        if ( "cron".equals( protocol ) ) {
            try {
                timer = new CronTimer( startDate, endDate, repeatLimit, new CronExpression( body ) );
            } catch ( ParseException e ) {
                context.getErrors().add( "Unable to build set timer '" + timerString + "'");
View Full Code Here

            // variable constraints always require a single declaration
            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 );
View Full Code Here

        if ( this.rule.isNoLoop() && this.rule.equals( context.getRuleOrigin() ) ) {
            agenda.increaseDormantActivations();
            return;
        }

        final Timer timer = this.rule.getTimer();

        if ( timer != null ) {
            final ScheduledAgendaItem item = agenda.createScheduledAgendaItem( tuple,
                                                                               context,
                                                                               this.rule,
View Full Code Here

        if ( this.rule.isNoLoop() && this.rule.equals( context.getRuleOrigin() ) ) {
            agenda.increaseDormantActivations();
            return;
        }

        final Timer timer = this.rule.getTimer();

        if ( timer != null ) {
            if ( item == null ) {
                item = agenda.createScheduledAgendaItem( leftTuple,
                                                         context,
View Full Code Here

            // variable constraints always require a single declaration
            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 );
View Full Code Here

        if ( this.rule.isNoLoop() && this.rule.equals( context.getRuleOrigin() ) ) {
            agenda.increaseDormantActivations();
            return;
        }

        final Timer timer = this.rule.getTimer();

        if ( timer != null ) {
            final ScheduledAgendaItem item = agenda.createScheduledAgendaItem( tuple,
                                                                               context,
                                                                               this );
View Full Code Here

TOP

Related Classes of org.drools.time.impl.Timer

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.