|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terracotta.statistics.StatisticMapper<SOURCE,TARGET>
public class StatisticMapper<SOURCE extends Enum<SOURCE>,TARGET extends Enum<TARGET>>
| Constructor Summary | |
|---|---|
StatisticMapper(Map<TARGET,Set<SOURCE>> translation,
OperationStatistic<SOURCE> statistic)
|
|
| Method Summary | |
|---|---|
void |
addDerivedStatistic(ChainedOperationObserver<? super TARGET> derived)
Register the given Observer to be called by this SourceStatistic |
void |
begin()
Called immediately prior to the operation beginning. |
long |
count(TARGET type)
Return the count of operations with the given type. |
void |
end(TARGET result)
Called immediately after the operation completes with no interesting parameters. |
void |
end(TARGET result,
long... parameters)
Called immediately after the operation completes. |
void |
removeDerivedStatistic(ChainedOperationObserver<? super TARGET> derived)
Remove the given registered Observer from this SourceStatistic. |
ValueStatistic<Long> |
statistic(Set<TARGET> results)
|
ValueStatistic<Long> |
statistic(TARGET result)
Return a ValueStatistic returning the count for the given result. |
long |
sum()
|
long |
sum(Set<TARGET> types)
|
Class<TARGET> |
type()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StatisticMapper(Map<TARGET,Set<SOURCE>> translation,
OperationStatistic<SOURCE> statistic)
| Method Detail |
|---|
public Class<TARGET> type()
type in interface OperationStatistic<TARGET extends Enum<TARGET>>public ValueStatistic<Long> statistic(TARGET result)
OperationStatisticValueStatistic returning the count for the given result.
statistic in interface OperationStatistic<TARGET extends Enum<TARGET>>result - the result of interest
ValueStatistic instancepublic ValueStatistic<Long> statistic(Set<TARGET> results)
statistic in interface OperationStatistic<TARGET extends Enum<TARGET>>public long count(TARGET type)
OperationStatistic
count in interface OperationStatistic<TARGET extends Enum<TARGET>>type - the result type
public long sum(Set<TARGET> types)
sum in interface OperationStatistic<TARGET extends Enum<TARGET>>public long sum()
sum in interface OperationStatistic<TARGET extends Enum<TARGET>>public void addDerivedStatistic(ChainedOperationObserver<? super TARGET> derived)
SourceStatisticObserver to be called by this SourceStatistic
addDerivedStatistic in interface SourceStatistic<ChainedOperationObserver<? super TARGET extends Enum<TARGET>>>derived - statistic to be registeredpublic void removeDerivedStatistic(ChainedOperationObserver<? super TARGET> derived)
SourceStatisticObserver from this SourceStatistic.
removeDerivedStatistic in interface SourceStatistic<ChainedOperationObserver<? super TARGET extends Enum<TARGET>>>derived - statistic to be removedpublic void begin()
OperationObserver
begin in interface OperationObserver<TARGET extends Enum<TARGET>>public void end(TARGET result)
OperationObserver
end in interface OperationObserver<TARGET extends Enum<TARGET>>result - the operation result
public void end(TARGET result,
long... parameters)
OperationObserver
end in interface OperationObserver<TARGET extends Enum<TARGET>>result - the operation resultparameters - the operation parameters
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||