Search in sources :

Example 6 with Accumulator

use of org.drools.core.spi.Accumulator in project drools by kiegroup.

the class MultiAccumulate method writeExternal.

public void writeExternal(ObjectOutput out) throws IOException {
    super.writeExternal(out);
    out.writeInt(accumulators.length);
    for (Accumulator acc : accumulators) {
        if (acc instanceof CompiledInvoker) {
            out.writeObject(null);
        } else {
            out.writeObject(acc);
        }
    }
}
Also used : Accumulator(org.drools.core.spi.Accumulator) CompiledInvoker(org.drools.core.spi.CompiledInvoker)

Aggregations

Accumulator (org.drools.core.spi.Accumulator)6 Declaration (org.drools.core.rule.Declaration)4 DescrBuildError (org.drools.compiler.compiler.DescrBuildError)3 ArrayElementReader (org.drools.core.base.extractors.ArrayElementReader)3 SelfReferenceClassFieldReader (org.drools.core.base.extractors.SelfReferenceClassFieldReader)3 MVELAccumulator (org.drools.core.base.mvel.MVELAccumulator)3 MultiAccumulate (org.drools.core.rule.MultiAccumulate)3 MutableTypeConstraint (org.drools.core.rule.MutableTypeConstraint)3 SingleAccumulate (org.drools.core.rule.SingleAccumulate)3 MvelConstraint (org.drools.core.rule.constraint.MvelConstraint)3 Constraint (org.drools.core.spi.Constraint)3 InternalReadAccessor (org.drools.core.spi.InternalReadAccessor)3 MvelAccumulator (org.drools.core.spi.MvelAccumulator)3 AccumulateFunctionCallDescr (org.drools.compiler.lang.descr.AccumulateDescr.AccumulateFunctionCallDescr)2 MVELCompilationUnit (org.drools.core.base.mvel.MVELCompilationUnit)2 Accumulate (org.drools.core.rule.Accumulate)2 Pattern (org.drools.core.rule.Pattern)2 AccumulateFunction (org.kie.api.runtime.rule.AccumulateFunction)2 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1