Package org.drools.spi

Examples of org.drools.spi.Duration


                                                            rule.getLhs(),
                                                            buildContext );
        final List data = new ArrayList();

        /* 1/10th of a second */
        final Duration duration = new Duration() {
            /**
             *
             */
            private static final long serialVersionUID = 400L;

View Full Code Here


                                                            rule,
                                                            rule.getLhs(),
                                                            buildContext );

        /* 1/10th of a second */
        final Duration duration = new Duration() {
            /**
             *
             */
            private static final long serialVersionUID = 400L;

View Full Code Here

        // @FIXME
        final LeftTuple cloned = tuple;//new LeftTuple( tuple );

        final InternalAgenda agenda = (InternalAgenda) workingMemory.getAgenda();

        final Duration dur = this.rule.getDuration();

        if ( dur != null && dur.getDuration( tuple ) > 0 ) {
            final ScheduledAgendaItem item = new ScheduledAgendaItem( context.getPropagationNumber(),
                                                                      cloned,
                                                                      agenda,
                                                                      context,
                                                                      this.rule,
View Full Code Here

        if( constraint instanceof VariableConstraint ) {
            // 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();
                Duration dur = context.getRule().getDuration();
                Duration newDur = new FixedDuration( uplimit );
                if( dur instanceof CompositeMaxDuration ) {
                    ((CompositeMaxDuration)dur).addDuration( newDur );
                } else {
                    if( dur == null ) {
                        dur = newDur;
View Full Code Here

        // @FIXME
        final LeftTuple cloned = tuple;//new LeftTuple( tuple );

        final InternalAgenda agenda = (InternalAgenda) workingMemory.getAgenda();

        final Duration dur = this.rule.getDuration();

        if ( dur != null && dur.getDuration( tuple ) > 0 ) {
            final ScheduledAgendaItem item = new ScheduledAgendaItem( context.getPropagationNumber(),
                                                                      cloned,
                                                                      agenda,
                                                                      context,
                                                                      this.rule,
View Full Code Here

        if( constraint instanceof VariableConstraint ) {
            // 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();
                Duration dur = context.getRule().getDuration();
                Duration newDur = new FixedDuration( uplimit );
                if( dur instanceof CompositeMaxDuration ) {
                    ((CompositeMaxDuration)dur).addDuration( newDur );
                } else {
                    if( dur == null ) {
                        dur = newDur;
View Full Code Here

        //we only have to clone the head fact to make sure the graph is not affected during consequence reads after a modify
        final ReteTuple cloned = new ReteTuple( tuple );

        final InternalAgenda agenda = (InternalAgenda) workingMemory.getAgenda();

        final Duration dur = this.rule.getDuration();

        if ( dur != null && dur.getDuration( tuple ) > 0 ) {
            final ScheduledAgendaItem item = new ScheduledAgendaItem( context.getPropagationNumber(),
                                                                      cloned,
                                                                      agenda,
                                                                      context,
                                                                      this.rule,
View Full Code Here

                data.add( "tested" );
            }
        } );

        /* 1/10th of a second */
        final Duration duration = new Duration() {
            /**
             *
             */
            private static final long serialVersionUID = 400L;

View Full Code Here

                                                            rule,
                                                            rule.getLhs() );
        final List data = new ArrayList();

        /* 1/10th of a second */
        final Duration duration = new Duration() {
            /**
             *
             */
            private static final long serialVersionUID = 400L;

View Full Code Here

                                                            new MockTupleSource( idGenerator.getNextId() ),
                                                            rule,
                                                            rule.getLhs() );

        /* 1/10th of a second */
        final Duration duration = new Duration() {
            /**
             *
             */
            private static final long serialVersionUID = 400L;

View Full Code Here

TOP

Related Classes of org.drools.spi.Duration

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.