Class ThrownStats

java.lang.Object
org.apache.juneau.rest.stats.ThrownStats
All Implemented Interfaces:
Cloneable

public class ThrownStats extends Object implements Cloneable
Represents an entry in ThrownStore.
See Also:
  • Constructor Details

  • Method Details

    • create

      public static ThrownStats.Builder create(BeanStore beanStore)
      Static creator.
      Parameters:
      beanStore - The bean store to use for creating beans.
      Returns:
      A new builder for this object.
    • getGuid

      public long getGuid()
      Returns a globally unique ID for this object.

      A random long generated during the creation of this object. Allows this object to be differentiated from other similar objects in multi-node environments so that statistics can be reliably stored in a centralized location.

      Returns:
      The globally unique ID for this object.
    • getHash

      public long getHash()
      Returns a hash of this exception that can typically be used to uniquely identify it.
      Returns:
      A hash of this exception.
    • getThrownClass

      public Class<?> getThrownClass()
      Returns the exception class.
      Returns:
      The exception class.
    • getCount

      public int getCount()
      Returns the number of times this exception occurred at a specific location in code.
      Returns:
      The number of times this exception occurred at a specific location in code.
    • getFirstOccurrence

      public long getFirstOccurrence()
      Returns the UTC time of the first occurrence of this exception at a specific location in code.
      Returns:
      The UTC time of the first occurrence of this exception at a specific location in code.
    • getLastOccurrence

      public long getLastOccurrence()
      Returns the UTC time of the last occurrence of this exception at a specific location in code.
      Returns:
      The UTC time of the last occurrence of this exception at a specific location in code.
    • getFirstMessage

      Returns the message of the first exception at a specific location in code.
      Returns:
      The message of the first exception at a specific location in code.
    • getStackTrace

      Returns the stack trace of the first exception at a specific location in code.
      Returns:
      The stack trace of the first exception at a specific location in code.
    • getCausedBy

      Returns the stats on the caused-by exception.
      Returns:
      The stats on the caused-by exception, never null.
    • increment

      Increments the occurrence count of this exception.
      Returns:
      This object.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • clone

      public ThrownStats clone()
      Overrides:
      clone in class Object