Class Accumulate

    • Method Detail

      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
      • getAccumulators

        public abstract Accumulator[] getAccumulators()
      • createFunctionContext

        public abstract java.lang.Object createFunctionContext()
      • init

        public abstract java.lang.Object init​(java.lang.Object workingMemoryContext,
                                              java.lang.Object accContext,
                                              java.lang.Object funcContext,
                                              Tuple leftTuple,
                                              ReteEvaluator reteEvaluator)
        Executes the initialization block of code
      • accumulate

        public abstract java.lang.Object accumulate​(java.lang.Object workingMemoryContext,
                                                    java.lang.Object context,
                                                    Tuple match,
                                                    InternalFactHandle handle,
                                                    ReteEvaluator reteEvaluator)
        Executes the accumulate (action) code for the given fact handle
      • tryReverse

        public abstract boolean tryReverse​(java.lang.Object workingMemoryContext,
                                           java.lang.Object context,
                                           Tuple leftTuple,
                                           InternalFactHandle handle,
                                           RightTuple rightParent,
                                           LeftTuple match,
                                           ReteEvaluator reteEvaluator)
        Executes the reverse (action) code for the given fact handle
      • getResult

        public abstract java.lang.Object getResult​(java.lang.Object workingMemoryContext,
                                                   java.lang.Object context,
                                                   Tuple leftTuple,
                                                   ReteEvaluator reteEvaluator)
        Gets the result of the accumulation
      • supportsReverse

        public abstract boolean supportsReverse()
        Returns true if this accumulate supports reverse
      • registerClone

        protected void registerClone​(Accumulate clone)
      • resolveDeclaration

        public Declaration resolveDeclaration​(java.lang.String identifier)
        Description copied from interface: RuleConditionElement
        Resolves the given identifier in the current scope and returns the Declaration object for the declaration. Returns null if identifier can not be resolved.
        Specified by:
        resolveDeclaration in interface RuleConditionElement
        Returns:
      • createWorkingMemoryContext

        public abstract java.lang.Object createWorkingMemoryContext()
      • isPatternScopeDelimiter

        public boolean isPatternScopeDelimiter()
        Description copied from interface: RuleConditionElement
        Returns true in case this RuleConditionElement delimits a pattern visibility scope. For instance, AND CE is not a scope delimiter, while NOT CE is a scope delimiter
        Specified by:
        isPatternScopeDelimiter in interface RuleConditionElement
        Returns:
      • isMultiFunction

        public abstract boolean isMultiFunction()
      • replaceAccumulatorDeclaration

        public abstract void replaceAccumulatorDeclaration​(Declaration declaration,
                                                           Declaration resolved)
      • getInnerDeclarationCache

        protected Declaration[] getInnerDeclarationCache()
      • getRequiredDeclarations

        public Declaration[] getRequiredDeclarations()
      • hasRequiredDeclarations

        public boolean hasRequiredDeclarations()
      • isGroupBy

        public boolean isGroupBy()