public interface StatisticsService extends Service
Modifier and Type | Method and Description |
---|---|
void |
cleanForNode(java.lang.Object node)
Clears all associations
|
java.util.Map<java.lang.String,org.terracotta.management.model.stats.Statistic<? extends java.io.Serializable>> |
collectStatistics(java.lang.String cacheName,
java.util.Collection<java.lang.String> statisticNames,
long since)
Returns the statistics for the cache
|
<K,V> void |
createCacheRegistry(java.lang.String cacheName,
Cache<K,V> cache,
java.util.function.LongSupplier timeSource)
Create statistics registry
|
<T extends java.lang.Enum<T>> |
createOperationStatistics(java.lang.String name,
java.lang.Class<T> outcome,
java.lang.String tag,
java.lang.Object context)
Create operation statistic for provided type
|
void |
deRegisterFromParent(java.lang.Object toDeassociate,
java.lang.Object parent)
De-registers object from the parent
|
java.util.Collection<org.terracotta.management.model.capabilities.descriptors.StatisticDescriptor> |
getCacheDescriptors(java.lang.String cacheName)
Returns the Statistics descriptor for the cache with the given alias
|
CacheStatistics |
getCacheStatistics(java.lang.String cacheName)
Return the object containing the statistics for a given cache name.
|
void |
registerCacheStatistics(java.lang.String cacheName)
Registers a cache for statistics
|
<T extends java.lang.Enum<T>,K,V> |
registerDerivedStatistics(java.lang.String cacheName,
Cache<K,V> cache,
java.lang.String statName,
T outcome,
java.lang.String derivedName,
LatencyHistogramConfiguration configuration)
Registers derived statistics for the cache
|
<T extends java.io.Serializable> |
registerStatistic(java.lang.Object context,
java.lang.String name,
org.terracotta.management.model.stats.StatisticType type,
java.util.Set<java.lang.String> tags,
java.util.function.Supplier<T> valueSupplier)
Register statistics with value supplier
|
<K,V,S extends java.lang.Enum<S>,T extends java.lang.Enum<T>> |
registerStoreStatistics(Store<K,V> store,
java.lang.String targetName,
int tierHeight,
java.lang.String tag,
java.util.Map<T,java.util.Set<S>> translation,
java.lang.String statisticName)
Registers store of the cache for statistics
|
void |
registerWithParent(java.lang.Object toAssociate,
java.lang.Object parent)
Registers the object to parent
|
CacheStatistics getCacheStatistics(java.lang.String cacheName)
cacheName
- name (alias) of the cache<K,V> void createCacheRegistry(java.lang.String cacheName, Cache<K,V> cache, java.util.function.LongSupplier timeSource)
cacheName
- name (alias) of the cachecache
- the Cache
associated with the given aliastimeSource
- source of time for statistics maintenancevoid registerCacheStatistics(java.lang.String cacheName)
cacheName
- name (alias) of the cachejava.util.Collection<org.terracotta.management.model.capabilities.descriptors.StatisticDescriptor> getCacheDescriptors(java.lang.String cacheName)
cacheName
- name (alias) of the cacheStatisticDescriptor
s of the cache<T extends java.lang.Enum<T>,K,V> void registerDerivedStatistics(java.lang.String cacheName, Cache<K,V> cache, java.lang.String statName, T outcome, java.lang.String derivedName, LatencyHistogramConfiguration configuration)
T
- the generic type of statisticscacheName
- name (alias) of the cachecache
- the cache associated with the given aliasstatName
- name of the statisticoutcome
- Class of the type of statisticsderivedName
- visible name of the statisticsconfiguration
- the histogram configuration for statisticsjava.util.Map<java.lang.String,org.terracotta.management.model.stats.Statistic<? extends java.io.Serializable>> collectStatistics(java.lang.String cacheName, java.util.Collection<java.lang.String> statisticNames, long since)
cacheName
- name (alias) of the cachestatisticNames
- names of the statisticssince
- time since statistics needs to be collectedvoid registerWithParent(java.lang.Object toAssociate, java.lang.Object parent)
toAssociate
- object to associateparent
- to which object is associated<K,V,S extends java.lang.Enum<S>,T extends java.lang.Enum<T>> OperationStatistic<T> registerStoreStatistics(Store<K,V> store, java.lang.String targetName, int tierHeight, java.lang.String tag, java.util.Map<T,java.util.Set<S>> translation, java.lang.String statisticName)
store
- Store
of the cache to be registeredtargetName
- statistics name after translationtierHeight
- of the storetag
- with which the statistics is associatedtranslation
- relationship among maintained statisticsstatisticName
- name of the statisticvoid deRegisterFromParent(java.lang.Object toDeassociate, java.lang.Object parent)
toDeassociate
- object to dissociateparent
- to which object is associatedvoid cleanForNode(java.lang.Object node)
node
- for which all associations are cleared<T extends java.io.Serializable> void registerStatistic(java.lang.Object context, java.lang.String name, org.terracotta.management.model.stats.StatisticType type, java.util.Set<java.lang.String> tags, java.util.function.Supplier<T> valueSupplier)
T
- the generic typecontext
- association objectname
- of the statisticstype
- StatisticType to be registeredtags
- with which the statistics is associatedvalueSupplier
- supplies the value to maintain statistics<T extends java.lang.Enum<T>> OperationObserver<T> createOperationStatistics(java.lang.String name, java.lang.Class<T> outcome, java.lang.String tag, java.lang.Object context)
name
- of the operation observeroutcome
- Class of the type of statistictag
- with which the statistics is associatedcontext
- association object