Interface PolicyMonitor
-
- All Known Implementing Classes:
PolicyMonitorImpl
public interface PolicyMonitorAn interface to a data structure for storing monitoring information about policy evaluations.
-
-
Field Summary
Fields Modifier and Type Field Description static StringPOLICY_MONITOR_DEBUG
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddEvaluation(long duration, String realm, String applicationName, String resourceName, Subject subject, PolicyMonitoringType monitoringType)Adds an evaluation which should be recorded by the PolicyMonitor.voidaddEvaluation(String policyName, long duration, String realm, String applicationName, String resourceName, Subject subject)Adds an individual, internal evaluation which should be recorded by the PolicyMonitor.longgetAverageEvaluationTime(PolicyMonitoringType monitoringType)Average length of time an evaluation takes to complete.longgetEvaluationAvgRate(PolicyMonitoringType monitoringType)The average rate at which evaluations have taken place.longgetEvaluationCumulativeCount(PolicyMonitoringType monitoringType)Total number of evaluations which have taken place.longgetEvaluationMaxRate(PolicyMonitoringType monitoringType)The maximum rate at which evaluations have taken place.longgetEvaluationMinRate(PolicyMonitoringType monitoringType)The minimum rate at which evaluations have taken place.StringgetSlowestEvaluation(PolicyMonitoringType monitoringType)Returns information on the slowest performing evaluation.StringgetSlowestInternalEvaluation()Returns the slowest individual policy evaluation.
-
-
-
Field Detail
-
POLICY_MONITOR_DEBUG
static final String POLICY_MONITOR_DEBUG
- See Also:
- Constant Field Values
-
-
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 completerealm- Realm in which the evaluation took placeapplicationName- Application name against which the evaluation was maderesourceName- Resource against which the evaluation was madesubject- The subject making the evaluationmonitoringType- 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 completerealm- Realm in which the evaluation took placeapplicationName- Application name against which the evaluation was maderesourceName- Resource against which the evaluation was madesubject- 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
-
-