public class MappedOperationStatistic<S extends Enum<S>,D extends Enum<D>> extends Object implements OperationStatistic<D>
| Modifier and Type | Field and Description |
|---|---|
String |
name |
Class<D> |
outcomeType |
Map<String,Object> |
properties |
Set<String> |
tags |
| Constructor and Description |
|---|
MappedOperationStatistic(Object tier,
Map<D,Set<S>> translation,
String statisticName,
int tierHeight,
String targetName,
String discriminator) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDerivedStatistic(ChainedOperationObserver<? super D> derived)
Register the given
Observer to be called by this SourceStatistic |
void |
begin()
Called immediately prior to the operation beginning.
|
long |
count(D type)
Return the count of operations with the given type.
|
void |
end(D result)
Called immediately after the operation completes with no interesting parameters.
|
void |
end(D result,
long... parameters)
Called immediately after the operation completes.
|
void |
removeDerivedStatistic(ChainedOperationObserver<? super D> derived)
Remove the given registered
Observer from this SourceStatistic. |
ValueStatistic<Long> |
statistic(D result)
Return a
ValueStatistic returning the count for the given result. |
ValueStatistic<Long> |
statistic(Set<D> results) |
long |
sum() |
long |
sum(Set<D> types) |
Class<D> |
type() |
public final String name
public ValueStatistic<Long> statistic(D result)
OperationStatisticValueStatistic returning the count for the given result.statistic in interface OperationStatistic<D extends Enum<D>>result - the result of interestValueStatistic instancepublic ValueStatistic<Long> statistic(Set<D> results)
statistic in interface OperationStatistic<D extends Enum<D>>public long count(D type)
OperationStatisticcount in interface OperationStatistic<D extends Enum<D>>type - the result typepublic long sum(Set<D> types)
sum in interface OperationStatistic<D extends Enum<D>>public long sum()
sum in interface OperationStatistic<D extends Enum<D>>public void addDerivedStatistic(ChainedOperationObserver<? super D> derived)
SourceStatisticObserver to be called by this SourceStatisticaddDerivedStatistic in interface SourceStatistic<ChainedOperationObserver<? super D extends Enum<D>>>derived - statistic to be registeredpublic void removeDerivedStatistic(ChainedOperationObserver<? super D> derived)
SourceStatisticObserver from this SourceStatistic.removeDerivedStatistic in interface SourceStatistic<ChainedOperationObserver<? super D extends Enum<D>>>derived - statistic to be removedpublic void begin()
OperationObserverbegin in interface OperationObserver<D extends Enum<D>>public void end(D result)
OperationObserverend in interface OperationObserver<D extends Enum<D>>result - the operation resultpublic void end(D result, long... parameters)
OperationObserverend in interface OperationObserver<D extends Enum<D>>result - the operation resultparameters - the operation parametersCopyright © 2018. All rights reserved.