Interface RuleUnitInstance<T extends RuleUnitData>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Releases all resources used by this RuleUnitInstance, setting it up for garbage collection.
      org.kie.api.runtime.rule.QueryResults executeQuery​(String query, Object... arguments)
      Executes the query with the given name on this instance, using the given set of arguments
      int fire()
      Trigger the pattern matching algorithm on all the facts contained in the DataSources of the RuleUnitData used by this RuleUnitInstance and fires all the rules activated by them.
      <T extends org.kie.api.time.SessionClock>
      T
      getClock()  
      T ruleUnitData()
      The instance of RuleUnitData containing the data used by this RuleUnitInstance.
      RuleUnit<T> unit()
      The RuleUnit from which this RuleUnitInstance has been created.
    • Method Detail

      • unit

        RuleUnit<T> unit()
        The RuleUnit from which this RuleUnitInstance has been created.
      • ruleUnitData

        T ruleUnitData()
        The instance of RuleUnitData containing the data used by this RuleUnitInstance.
      • fire

        int fire()
        Trigger the pattern matching algorithm on all the facts contained in the DataSources of the RuleUnitData used by this RuleUnitInstance and fires all the rules activated by them.
        Returns:
        The number of fired rules.
      • executeQuery

        org.kie.api.runtime.rule.QueryResults executeQuery​(String query,
                                                           Object... arguments)
        Executes the query with the given name on this instance, using the given set of arguments
        Parameters:
        query - The name of the query to be executed
        arguments - The arguments to be passed to the query
        Returns:
        TODO this should return a QueryResults
      • getClock

        <T extends org.kie.api.time.SessionClock> T getClock()
        Returns:
        the session clock instance used by this RuleUnitInstance
      • close

        void close()
        Releases all resources used by this RuleUnitInstance, setting it up for garbage collection. This method must always be called after finishing using the RuleUnitInstance, or the engine will not free the memory it uses.
        Specified by:
        close in interface AutoCloseable