Class RuleStatistics

  • All Implemented Interfaces:
    Serializable

    public class RuleStatistics
    extends Item
    A separate item to track rule statistics, because we will manage the persistence and updating of these seperately from the rules themselves. This object contains all the relevant statistics concerning the execution of a rule, including accumulated execution times.
    See Also:
    Serialized Form
    • Constructor Detail

      • RuleStatistics

        public RuleStatistics()
      • RuleStatistics

        public RuleStatistics​(String itemId)
    • Method Detail

      • getExecutionCount

        public long getExecutionCount()
        Retrieve the execution count of the rule in the cluster
        Returns:
        a long that is the total number of executions of the rule without the local node execution count
      • setExecutionCount

        public void setExecutionCount​(long executionCount)
        Set the execution count of the rule in the cluster
        Parameters:
        executionCount - a long that represents the number of execution of the rule in the cluster
      • getLocalExecutionCount

        public long getLocalExecutionCount()
        Retrieve the execution count of the rule on this single node since the last sync with the cluster
        Returns:
        a long that is the total number of executions on this node since the last sync with the cluster
      • setLocalExecutionCount

        public void setLocalExecutionCount​(long localExecutionCount)
        Sets the number of local execution counts for this node since the last sync with the cluster
        Parameters:
        localExecutionCount - a long that represents the number of execution of the rule since the last sync with the cluster
      • getConditionsTime

        public long getConditionsTime()
        Retrieve the accumulated time evaluating the conditions of the rule in the cluster
        Returns:
        a long representing the accumulated time in milliseconds that represents the time spent evaluating the conditions of the rule for the whole cluster
      • setConditionsTime

        public void setConditionsTime​(long conditionsTime)
        Sets the execution time of the condition of the rule for the whole cluster
        Parameters:
        conditionsTime - a long representing a time in milliseconds
      • getLocalConditionsTime

        public long getLocalConditionsTime()
        Retrieve the accumulated execution time of the rule's condition since the last sync with the cluster
        Returns:
        a long that represents the accumulated time in milliseconds
      • setLocalConditionsTime

        public void setLocalConditionsTime​(long localConditionsTime)
        Sets the accumulated execution time of the rule's condition since the last sync with the cluster
        Parameters:
        localConditionsTime - a long that represents the accumulated time in milliseconds
      • getActionsTime

        public long getActionsTime()
        Retrieve the accumulated time of the rule's actions
        Returns:
        a long representing the accumulated time in milliseconds
      • setActionsTime

        public void setActionsTime​(long actionsTime)
        Sets the accumulated time for the rule's actions
        Parameters:
        actionsTime - a long representing the accumulated time in milliseconds
      • getLocalActionsTime

        public long getLocalActionsTime()
        Retrieve the accumulated time spent executing the rule's actions since the last sync with the cluster
        Returns:
        a long representing the accumulated time in milliseconds
      • setLocalActionsTime

        public void setLocalActionsTime​(long localActionsTime)
        Sets the accumulated time spend executing the rule's actions since the last sync with the cluster
        Parameters:
        localActionsTime - a long representing the accumulated time in milliseconds
      • getLastSyncDate

        public Date getLastSyncDate()
        Retrieve the last sync date
        Returns:
        a date that was set the last time the statistics were synchronized with the cluster
      • setLastSyncDate

        public void setLastSyncDate​(Date lastSyncDate)
        Sets the last sync date
        Parameters:
        lastSyncDate - a date that represents the last time the statistics were synchronized with the cluster