Enum StatisticsKey

java.lang.Object
java.lang.Enum<StatisticsKey>
com.atlassian.beehive.core.stats.StatisticsKey
All Implemented Interfaces:
Serializable, Comparable<StatisticsKey>, java.lang.constant.Constable

public enum StatisticsKey extends Enum<StatisticsKey>
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 Constants
    Enum Constant
    Description
    The 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 exception
    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.
    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 exception
    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.
    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 exception
    A 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 exception
    The 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

    Fields
    Modifier and Type
    Field
    Description
    Sorts statistics keys by label.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the label for this statistics key.
    Returns the type of statistic that this is.
    Returns the enum constant of this type with the specified name.
    static StatisticsKey[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • AVERAGE_HOLD_TIME_MILLIS

      public static final StatisticsKey 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

      public static final StatisticsKey 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

      public static final StatisticsKey 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

      public static final StatisticsKey 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

      public static final StatisticsKey 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

      public static final StatisticsKey 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

      public static final StatisticsKey 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

      public static final StatisticsKey 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

      public static final StatisticsKey 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

      public static final StatisticsKey LAST_ACCESS
      A timestamp, expressed in millis since the epoch, when this lock was last accessed.
    • LAST_LOCK

      public static final StatisticsKey LAST_LOCK
      A timestamp, expressed in millis since the epoch, when this lock was last successfully locked.
    • LAST_UNLOCK

      public static final StatisticsKey LAST_UNLOCK
      A timestamp, expressed in millis since the epoch, when this lock was last unlocked.
    • LAST_RENEWAL

      public static final StatisticsKey LAST_RENEWAL
      A timestamp, expressed in millis since the epoch, when this lock's state was last renewed.
    • FORCED_UNLOCK

      public static final StatisticsKey FORCED_UNLOCK
      The total number of times that a lock has had to be "recovered" by forcibly unlocking it.
    • SUCCESSFUL_LOCKS

      public static final StatisticsKey SUCCESSFUL_LOCKS
      The total number of times that the lock has been successfully acquired.
    • SUCCESSFUL_UNLOCKS

      public static final StatisticsKey SUCCESSFUL_UNLOCKS
      The total number of times that the lock has been released(regardless of exceptions that happended in the process).
    • WAIT_QUEUE_LENGTH

      public static final StatisticsKey WAIT_QUEUE_LENGTH
      The number of threads that are currently waiting on this lock.
  • Field Details

  • Method Details

    • values

      public static StatisticsKey[] 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

      public static StatisticsKey valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getLabel

      public String getLabel()
      Returns the label for this statistics key. This is intended to be the same as the Enum.name(), except written in camelCase.
      Returns:
      the label for this statistics key.
    • getType

      public StatisticsType getType()
      Returns the type of statistic that this is.
      Returns:
      the type of statistic that this is.