Package com.atlassian.beehive.core.stats
Enum StatisticsKey
- All Implemented Interfaces:
Serializable,Comparable<StatisticsKey>,java.lang.constant.Constable
Represents some type of information that might be collected for a
ManagedClusterLock.
Warning: The caller should not make assumptions about which specific
statistics are available or what they mean. All statistics are optional; some may be
omitted if they have an uninteresting value (like 0); and in many cases the
exact meaning has been left open for the implementation to define. The statistics may
represent only local information as opposed to reporting the global state of the cluster.
Developers are encouraged to disclose any design decisions they have made in the
JavaDocs for the ManagedClusterLock.getStatistics()
implementation.
- Since:
- v0.2
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe average length of time, in milliseconds, that the lock is held after it has been acquired.The average length of time, in milliseconds, that threads have had to block waiting to acquire the lock, whether they were ultimately successful or not.The total number of times that a request to acquire/release/renew the lock failed because of a non-state-related exceptionThe total number of times that a request to acquire the lock failed because it was already held by another thread on the same node.The total number of times that a request to acquire the lock failed because it was already held by another node in the cluster.The total number of times that a lock has had to be "recovered" by forcibly unlocking it.A timestamp, expressed in millis since the epoch, when this lock was last accessed.A timestamp, expressed in millis since the epoch, when a last request to acquire/release/renew the lock failed because of a non-state-related exceptionA timestamp, expressed in millis since the epoch, when a request to acquire the lock failed because it was already held by another node in the cluster.A timestamp, expressed in millis since the epoch, when this lock was last successfully locked.A timestamp, expressed in millis since the epoch, when this lock's state was last renewed.A timestamp, expressed in millis since the epoch, when a last request to acquire/release/renew the lock failed because of a lock state state exceptionA timestamp, expressed in millis since the epoch, when this lock was last unlocked.The total number of times that a request to acquire/release/renew the lock failed because of a lock state related exceptionThe total number of times that the lock has been successfully acquired.The total number of times that the lock has been released(regardless of exceptions that happended in the process).The number of threads that are currently waiting on this lock. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Comparator<StatisticsKey>Sorts statistics keys bylabel. -
Method Summary
Modifier and TypeMethodDescriptiongetLabel()Returns the label for this statistics key.getType()Returns the type of statistic that this is.static StatisticsKeyReturns the enum constant of this type with the specified name.static StatisticsKey[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
AVERAGE_HOLD_TIME_MILLIS
The average length of time, in milliseconds, that the lock is held after it has been acquired. -
AVERAGE_WAIT_TIME_MILLIS
The average length of time, in milliseconds, that threads have had to block waiting to acquire the lock, whether they were ultimately successful or not. -
FAIL_LOCAL
The total number of times that a request to acquire the lock failed because it was already held by another thread on the same node. -
FAIL_REMOTE
The total number of times that a request to acquire the lock failed because it was already held by another node in the cluster. -
LAST_FAIL_REMOTE
A timestamp, expressed in millis since the epoch, when a request to acquire the lock failed because it was already held by another node in the cluster. -
LAST_STATE_ERROR
A timestamp, expressed in millis since the epoch, when a last request to acquire/release/renew the lock failed because of a lock state state exception -
STATE_ERROR
The total number of times that a request to acquire/release/renew the lock failed because of a lock state related exception -
LAST_ERROR
A timestamp, expressed in millis since the epoch, when a last request to acquire/release/renew the lock failed because of a non-state-related exception -
ERROR
The total number of times that a request to acquire/release/renew the lock failed because of a non-state-related exception -
LAST_ACCESS
A timestamp, expressed in millis since the epoch, when this lock was last accessed. -
LAST_LOCK
A timestamp, expressed in millis since the epoch, when this lock was last successfully locked. -
LAST_UNLOCK
A timestamp, expressed in millis since the epoch, when this lock was last unlocked. -
LAST_RENEWAL
A timestamp, expressed in millis since the epoch, when this lock's state was last renewed. -
FORCED_UNLOCK
The total number of times that a lock has had to be "recovered" by forcibly unlocking it. -
SUCCESSFUL_LOCKS
The total number of times that the lock has been successfully acquired. -
SUCCESSFUL_UNLOCKS
The total number of times that the lock has been released(regardless of exceptions that happended in the process). -
WAIT_QUEUE_LENGTH
The number of threads that are currently waiting on this lock.
-
-
Field Details
-
SORT_BY_LABEL
Sorts statistics keys bylabel.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getLabel
Returns the label for this statistics key. This is intended to be the same as theEnum.name(), except written incamelCase.- Returns:
- the label for this statistics key.
-
getType
Returns the type of statistic that this is.- Returns:
- the type of statistic that this is.
-