Class PolicyTimingEntry

  • All Implemented Interfaces:
    TimingEntry

    public class PolicyTimingEntry
    extends Object
    implements TimingEntry
    Used to store details on how long a policy evaluation took. If a specific policy evaluation is being recorded then the policy name value will be set. If not, and this timing information pertains instead to the length of time to perform all policy evaluations for a specific resource, the policy name value will be left null.
    • Constructor Detail

      • PolicyTimingEntry

        public PolicyTimingEntry​(long duration,
                                 String realm,
                                 String applicationName,
                                 String resourceName,
                                 Subject subject)
        Constructor for non-policy-specific timing events.
        Parameters:
        duration - Length of time the evaluation took
        realm - Realm under which the evaluation took place
        applicationName - Application under which the evaluation took place
        resourceName - Resource name against which the evaluation took place
        subject - Subject against which the evaluation took place
      • PolicyTimingEntry

        public PolicyTimingEntry​(String policyName,
                                 long duration,
                                 String realm,
                                 String applicationName,
                                 String resourceName,
                                 Subject subject)
        Constructor for a policy-specific timing event.
        Parameters:
        policyName - Name of the policy evaluated
        duration - Length of time the evaluation took
        realm - Realm under which the evaluation took place
        applicationName - Application under which the evaluation took place
        resourceName - Resource name against which the evaluation took place
        subject - Subject against which the evaluation took place
    • Method Detail

      • toString

        public String toString()
        String representation of this PolicyTimingEntry. Used to report out the information via the monitoring system.
        Overrides:
        toString in class Object
        Returns:
        String representation of the information contained within this TimingEntry.
      • getDuration

        public long getDuration()
        Gets the duration of this TimingEntry.
        Specified by:
        getDuration in interface TimingEntry
        Returns:
        the duration in ms.