Class ThrownStats
java.lang.Object
org.apache.juneau.rest.server.stats.ThrownStats
Represents an entry in
ThrownStore.
The first message and stack trace are available to Java callers but are not part of the serialized bean, so statistics output carries only the class name, counts and timestamps.
See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ThrownStatscopyOrNull(ThrownStats value) Null-safe copy: returns a deep copy of the specified value, ornull if the value isnull .static ThrownStats.BuilderStatic creator.Returns the stats on the caused-by exception.intgetCount()Returns the number of times this exception occurred at a specific location in code.Returns the message of the first exception at a specific location in code.longReturns the UTC time of the first occurrence of this exception at a specific location in code.longgetGuid()Returns a globally unique ID for this object.longgetHash()Returns a hash of this exception that can typically be used to uniquely identify it.longReturns the UTC time of the last occurrence of this exception at a specific location in code.Returns the stack trace of the first exception at a specific location in code.Class<?>Returns the exception class.Increments the occurrence count of this exception.toString()
-
Constructor Details
-
ThrownStats
Constructor.- Parameters:
builder- The builder for this object. Must not benull .
-
-
Method Details
-
create
Static creator.- Parameters:
beanStore- The bean store to use for creating beans.- Returns:
- A new builder for this object.
-
copyOrNull
Null-safe copy: returns a deep copy of the specified value, ornull if the value isnull .- Parameters:
value- The value to copy. Can benull , in which casenull is returned.- Returns:
- A copy of the value, or
null if the value wasnull .
-
getCausedBy
Returns the stats on the caused-by exception.- Returns:
- The stats on the caused-by exception, never
null .
-
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.
-
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, or
null if the exception had no message.
-
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.
-
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
Returns a hash of this exception that can typically be used to uniquely identify it.- Returns:
- A hash of this exception.
-
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.
-
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.
-
getThrownClass
Returns the exception class.- Returns:
- The exception class.
-
increment
Increments the occurrence count of this exception.- Returns:
- This object.
-
properties
-
toString
-