org.terracotta.statistics
Interface OperationStatistic<T extends Enum<T>>

All Superinterfaces:
OperationObserver<T>, SourceStatistic<ChainedOperationObserver<? super T>>
All Known Implementing Classes:
AbstractOperationStatistic

public interface OperationStatistic<T extends Enum<T>>
extends OperationObserver<T>, SourceStatistic<ChainedOperationObserver<? super T>>

Author:
cdennis

Method Summary
 long count(T type)
          Return the count of operations with the given type.
 ValueStatistic<Long> statistic(Set<T> results)
           
 ValueStatistic<Long> statistic(T result)
          Return a returning the count for the given result.
 long sum()
           
 long sum(Set<T> types)
           
 Class<T> type()
           
 
Methods inherited from interface org.terracotta.statistics.observer.OperationObserver
begin, end, end
 
Methods inherited from interface org.terracotta.statistics.SourceStatistic
addDerivedStatistic, removeDerivedStatistic
 

Method Detail

type

Class<T> type()

statistic

ValueStatistic<Long> statistic(T result)
Return a returning the count for the given result.

Parameters:
result - the result of interest
Returns:
a ValueStatistic instance

statistic

ValueStatistic<Long> statistic(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(Set<T> types)

sum

long sum()


Copyright © 2015. All Rights Reserved.