public enum StatisticsKey extends Enum<StatisticsKey>
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.
| Enum Constant and Description |
|---|
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.
|
ERROR
The total number of times that a request to acquire/release/renew the lock failed because of a non-state-related exception
|
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.
|
FORCED_UNLOCK
The total number of times that a lock has had to be "recovered" by forcibly unlocking it.
|
LAST_ACCESS
A timestamp, expressed in millis since the epoch, when this lock was last accessed.
|
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
|
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_LOCK
A timestamp, expressed in millis since the epoch, when this lock was last successfully locked.
|
LAST_RENEWAL
A timestamp, expressed in millis since the epoch, when this lock's state was last renewed.
|
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
|
LAST_UNLOCK
A timestamp, expressed in millis since the epoch, when this lock was last unlocked.
|
STATE_ERROR
The total number of times that a request to acquire/release/renew the lock failed because of a lock state related exception
|
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.
|
| Modifier and Type | Field and Description |
|---|---|
static Comparator<StatisticsKey> |
SORT_BY_LABEL
Sorts statistics keys by
label. |
| Modifier and Type | Method and Description |
|---|---|
String |
getLabel()
Returns the label for this statistics key.
|
StatisticsType |
getType()
Returns the type of statistic that this is.
|
static StatisticsKey |
valueOf(String name)
Returns 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.
|
public static final StatisticsKey AVERAGE_HOLD_TIME_MILLIS
public static final StatisticsKey AVERAGE_WAIT_TIME_MILLIS
public static final StatisticsKey FAIL_LOCAL
public static final StatisticsKey FAIL_REMOTE
public static final StatisticsKey LAST_FAIL_REMOTE
public static final StatisticsKey LAST_STATE_ERROR
public static final StatisticsKey STATE_ERROR
public static final StatisticsKey LAST_ERROR
public static final StatisticsKey ERROR
public static final StatisticsKey LAST_ACCESS
public static final StatisticsKey LAST_LOCK
public static final StatisticsKey LAST_UNLOCK
public static final StatisticsKey LAST_RENEWAL
public static final StatisticsKey FORCED_UNLOCK
public static final StatisticsKey SUCCESSFUL_LOCKS
public static final StatisticsKey SUCCESSFUL_UNLOCKS
public static final StatisticsKey WAIT_QUEUE_LENGTH
public static Comparator<StatisticsKey> SORT_BY_LABEL
label.public static StatisticsKey[] values()
for (StatisticsKey c : StatisticsKey.values()) System.out.println(c);
public static StatisticsKey valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String getLabel()
Enum.name(), except written in camelCase.public StatisticsType getType()
Copyright © 2019 Atlassian. All rights reserved.