Package org.drools.core.rule

Examples of org.drools.core.rule.Accumulate$Wirer


                                   AccumulateMemory am,
                                   InternalWorkingMemory wm,
                                   RightTupleSets srcRightTuples,
                                   LeftTupleSets trgLeftTuples) {
            RightTupleMemory rtm = am.getBetaMemory().getRightTupleMemory();
            Accumulate accumulate = accNode.getAccumulate();

            for (RightTuple rightTuple = srcRightTuples.getDeleteFirst(); rightTuple != null; ) {
                RightTuple next = rightTuple.getStagedNext();
                if (rightTuple.getMemory() != null) {
                    // it may have been staged and never actually added
View Full Code Here


            if (srcLeftTuples.getInsertFirst() != null) {
                doLeftInserts(accNode, sink, am, wm, srcLeftTuples, tempLeftTuples);
            }

            Accumulate accumulate = accNode.getAccumulate();
            // we do not need collect retracts. RightTuple retracts end up as updates for lefttuples.
            // LeftTuple retracts are already on the trgLeftTuples
            for (LeftTuple leftTuple = tempLeftTuples.getInsertFirst(); leftTuple != null; ) {
                LeftTuple next = leftTuple.getStagedNext();
                evaluateResultConstraints(accNode, sink, accumulate, leftTuple, leftTuple.getPropagationContext(),
View Full Code Here

                                  AccumulateMemory am,
                                  InternalWorkingMemory wm,
                                  LeftTupleSets srcLeftTuples,
                                  LeftTupleSets trgLeftTuples) {

            Accumulate accumulate = accNode.getAccumulate();
            BetaMemory bm = am.getBetaMemory();
            LeftTupleMemory ltm = bm.getLeftTupleMemory();
            RightTupleMemory rtm = bm.getRightTupleMemory();
            ContextEntry[] contextEntry = bm.getContext();
            BetaConstraints constraints = accNode.getRawConstraints();


            for (LeftTuple leftTuple = srcLeftTuples.getInsertFirst(); leftTuple != null; ) {
                LeftTuple next = leftTuple.getStagedNext();

                boolean useLeftMemory = useLeftMemory(accNode, leftTuple);

                if (useLeftMemory) {
                    ltm.add(leftTuple);
                }

                PropagationContext context = leftTuple.getPropagationContext();

                AccumulateContext accresult = new AccumulateContext();


                leftTuple.setObject(accresult);

                accresult.context = accumulate.createContext();

                accumulate.init(am.workingMemoryContext,
                                accresult.context,
                                leftTuple,
                                wm);

                constraints.updateFromTuple(contextEntry,
View Full Code Here

                                   LeftTupleSink sink,
                                   AccumulateMemory am,
                                   InternalWorkingMemory wm,
                                   RightTupleSets srcRightTuples,
                                   LeftTupleSets trgLeftTuples) {
            Accumulate accumulate = accNode.getAccumulate();

            BetaMemory bm = am.getBetaMemory();
            LeftTupleMemory ltm = bm.getLeftTupleMemory();
            RightTupleMemory rtm = bm.getRightTupleMemory();
            ContextEntry[] contextEntry = bm.getContext();
View Full Code Here

                                  InternalWorkingMemory wm,
                                  LeftTupleSets srcLeftTuples,
                                  LeftTupleSets trgLeftTuples) {
            BetaMemory bm = am.getBetaMemory();
            RightTupleMemory rtm = bm.getRightTupleMemory();
            Accumulate accumulate = accNode.getAccumulate();
            ContextEntry[] contextEntry = bm.getContext();
            BetaConstraints constraints = accNode.getRawConstraints();

            for (LeftTuple leftTuple = srcLeftTuples.getUpdateFirst(); leftTuple != null; ) {
                LeftTuple next = leftTuple.getStagedNext();
View Full Code Here

                                   LeftTupleSets trgLeftTuples) {
            BetaMemory bm = am.getBetaMemory();
            LeftTupleMemory ltm = bm.getLeftTupleMemory();
            ContextEntry[] contextEntry = bm.getContext();
            BetaConstraints constraints = accNode.getRawConstraints();
            Accumulate accumulate = accNode.getAccumulate();

            for (RightTuple rightTuple = srcRightTuples.getUpdateFirst(); rightTuple != null; ) {
                RightTuple next = rightTuple.getStagedNext();
                PropagationContext context = rightTuple.getPropagationContext();
View Full Code Here

        final boolean readLocalsFromTuple = PackageBuilderUtil.isReadLocalsFromTuple(accumDescr, source);
       
        Map<String, Declaration> declsInScope = context.getDeclarationResolver().getDeclarations( context.getRule() );
        Map<String, Class< ? >> declCls = DeclarationScopeResolver.getDeclarationClasses( declsInScope );

        Accumulate accumulate;
        if ( accumDescr.isExternalFunction() ) {
            // if it uses 1+ external function, build methods for them
            accumulate = buildExternalFunctionCall( context,
                                                    accumDescr,
                                                    source,
View Full Code Here

                                                                      usedIdentifiers,
                                                                      previousDeclarations,
                                                                      readLocalsFromTuple );
        }

        return new Accumulate(source,
                requiredDecl.toArray(new Declaration[requiredDecl.size()]),
                accumulators,
                accumDescr.isMultiFunction());
    }
View Full Code Here

        }

        map.put( "hashCode",
                actionCode.hashCode());

        Accumulate accumulate = new Accumulate(source, declarations);

        generateTemplates("accumulateInnerClass",
                "accumulateInvoker",
                context,
                className,
View Full Code Here

                                                      sourceOuterDeclr,
                                                      boundIds,
                                                      readLocalsFromTuple );
            }

            final Accumulate accumulate = new Accumulate( source,
                                                          null,
                                                          accumulators,
                                                          accumDescr.isMultiFunction() );

            MVELDialectRuntimeData data = (MVELDialectRuntimeData) context.getPkg().getDialectRuntimeRegistry().getDialectData( "mvel" );
View Full Code Here

TOP

Related Classes of org.drools.core.rule.Accumulate$Wirer

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.