Interface PolicyMonitor

  • All Known Implementing Classes:
    PolicyMonitorImpl

    public interface PolicyMonitor
    An interface to a data structure for storing monitoring information about policy evaluations.
    • Method Detail

      • addEvaluation

        void addEvaluation​(long duration,
                           String realm,
                           String applicationName,
                           String resourceName,
                           Subject subject,
                           PolicyMonitoringType monitoringType)
        Adds an evaluation which should be recorded by the PolicyMonitor. This relates to all policies being applied to a request.
        Parameters:
        duration - Total length of time in ms the evaluation took to complete
        realm - Realm in which the evaluation took place
        applicationName - Application name against which the evaluation was made
        resourceName - Resource against which the evaluation was made
        subject - The subject making the evaluation
        monitoringType - Whether the evaluation was of SUBTREE or SELF mode
      • addEvaluation

        void addEvaluation​(String policyName,
                           long duration,
                           String realm,
                           String applicationName,
                           String resourceName,
                           Subject subject)
        Adds an individual, internal evaluation which should be recorded by the PolicyMonitor. This relates to the specific policy being evaluated, and not to all the policies being applied to a request.
        Parameters:
        duration - Total length of time in ms the evaluation took to complete
        realm - Realm in which the evaluation took place
        applicationName - Application name against which the evaluation was made
        resourceName - Resource against which the evaluation was made
        subject - The subject making the evaluation
      • getSlowestEvaluation

        String getSlowestEvaluation​(PolicyMonitoringType monitoringType)
        Returns information on the slowest performing evaluation.
        Parameters:
        monitoringType - SUBTREE or SELF
        Returns:
        information on the slowest performing evaluation
      • getAverageEvaluationTime

        long getAverageEvaluationTime​(PolicyMonitoringType monitoringType)
        Average length of time an evaluation takes to complete.
        Parameters:
        monitoringType - SUBTREE or SELF
        Returns:
        The average length of time it takes to complete an evaluation in ms
      • getEvaluationCumulativeCount

        long getEvaluationCumulativeCount​(PolicyMonitoringType monitoringType)
        Total number of evaluations which have taken place.
        Parameters:
        monitoringType - SUBTREE or SELF
        Returns:
        The total number of evaluations which have occured
      • getEvaluationMaxRate

        long getEvaluationMaxRate​(PolicyMonitoringType monitoringType)
        The maximum rate at which evaluations have taken place.
        Parameters:
        monitoringType - SUBTREE or SELF
        Returns:
        The maximum rate at which evaluations have been performed
      • getEvaluationMinRate

        long getEvaluationMinRate​(PolicyMonitoringType monitoringType)
        The minimum rate at which evaluations have taken place.
        Parameters:
        monitoringType - SUBTREE or SELF
        Returns:
        The minimum rate at which evaluations have been performed
      • getEvaluationAvgRate

        long getEvaluationAvgRate​(PolicyMonitoringType monitoringType)
        The average rate at which evaluations have taken place.
        Parameters:
        monitoringType - SUBTREE or SELF
        Returns:
        The average rate at which evaluations have been performed
      • getSlowestInternalEvaluation

        String getSlowestInternalEvaluation()
        Returns the slowest individual policy evaluation.
        Returns:
        information on the slowest performing policy evaluation