Package com.atlassian.cache
Enum Class CacheStatisticsKey
- All Implemented Interfaces:
Serializable,Comparable<CacheStatisticsKey>,Constable
An immutable representation of a statistics key for a Cache.
This class is used by
ManagedCache.getStatistics() to dynamically distinguish different cache
statistics available for a Cache.- Since:
- v2.4.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionReturns the number of times an entry has been evicted.Returns the number of bytes used by theCache.Returns the number of timesCachelookup methods have returned a cached value.Returns the total number of times that Cache lookup methods attempted to load new values.Returns the number of times Cache lookup methods threw an exception while loading a new value.Returns the number of times Cache lookup methods have successfully loaded a new value.Returns the number of timesCachelookup methods have returned an uncached (newly loaded) value, or null.Returns the number of timesCacheput methods have added a cached value.Returns the number of timesCacheremove methods have removed a cached value.Returns the number of times Cache lookup methods have returned either a cached or uncached value.Returns the number of cached objects kept referenced by theCache(depends on the cache implementation)Returns the total number of nanoseconds the cache has spent loading new values.Returns the number of nanoseconds spent computing values for cache misses. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Comparator<CacheStatisticsKey> Sorts cache statistics keys bylabel. -
Method Summary
Modifier and TypeMethodDescriptiongetLabel()Returns the label for this cache statistics key.getType()Returns the type of statistic that this is.static CacheStatisticsKeyReturns the enum constant of this class with the specified name.static CacheStatisticsKey[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SIZE
Returns the number of cached objects kept referenced by theCache(depends on the cache implementation) -
HEAP_SIZE
Returns the number of bytes used by theCache.Note: This is likely to be a very expensive statistic in some implementations, so consumers may want to discard it when it hasn't been explicitly requested. Even where available, the reported heap size is almost certain to be only an approximation of the cache's total memory use.
-
HIT_COUNT
Returns the number of timesCachelookup methods have returned a cached value. -
PUT_COUNT
Returns the number of timesCacheput methods have added a cached value. -
REMOVE_COUNT
Returns the number of timesCacheremove methods have removed a cached value. -
MISS_COUNT
-
LOAD_COUNT
Returns the total number of times that Cache lookup methods attempted to load new values. -
LOAD_SUCCESS_COUNT
Returns the number of times Cache lookup methods have successfully loaded a new value. -
LOAD_EXCEPTION_COUNT
Returns the number of times Cache lookup methods threw an exception while loading a new value. -
TOTAL_MISS_TIME
Returns the number of nanoseconds spent computing values for cache misses. This is only relevant for caches using a CacheLoader. -
TOTAL_LOAD_TIME
Returns the total number of nanoseconds the cache has spent loading new values. -
EVICTION_COUNT
Returns the number of times an entry has been evicted. -
REQUEST_COUNT
Returns the number of times Cache lookup methods have returned either a cached or uncached value.
-
-
Field Details
-
SORT_BY_LABEL
Sorts cache statistics keys bylabel.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getLabel
Returns the label for this cache statistics key. This is intended to be the same as theEnum.name(), except written incamelCase.- Returns:
- the label for this cache statistics key.
-
getType
Returns the type of statistic that this is. Different types of statistics might render differently in a user interface.- Returns:
- the type of statistic that this is.
-