Package org.terracotta.statistics
Interface OperationStatistic<T extends java.lang.Enum<T>>
-
- All Superinterfaces:
OperationObserver<T>,SourceStatistic<ChainedOperationObserver<? super T>>
- All Known Implementing Classes:
AbstractOperationStatistic,GeneralOperationStatistic,MappedOperationStatistic,StatisticMapper,ZeroOperationStatistic
public interface OperationStatistic<T extends java.lang.Enum<T>> extends OperationObserver<T>, SourceStatistic<ChainedOperationObserver<? super T>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description longcount(T type)Return the count of operations with the given type.default ValueStatistic<java.lang.Long>statistic(java.util.Set<T> results)default ValueStatistic<java.lang.Long>statistic(T result)Return aValueStatisticreturning the count for the given result.longsum()longsum(java.util.Set<T> types)java.lang.Class<T>type()-
Methods inherited from interface org.terracotta.statistics.observer.OperationObserver
begin, end
-
Methods inherited from interface org.terracotta.statistics.SourceStatistic
addDerivedStatistic, getDerivedStatistics, removeDerivedStatistic
-
-
-
-
Method Detail
-
type
java.lang.Class<T> type()
-
statistic
default ValueStatistic<java.lang.Long> statistic(T result)
Return aValueStatisticreturning the count for the given result.- Parameters:
result- the result of interest- Returns:
- a
ValueStatisticinstance
-
statistic
default ValueStatistic<java.lang.Long> statistic(java.util.Set<T> results)
-
count
long count(T type)
Return the count of operations with the given type.- Parameters:
type- the result type- Returns:
- the operation count
-
sum
long sum(java.util.Set<T> types)
-
sum
long sum()
-
-