Top Description Fields Constructors Methods
net.sf.ehcache.statistics.extended

pack-priv Class CompoundOperationImpl<T extends java.lang.Enum<T>>

extends Object
implements ExtendedStatistics.Operation<T extends Enum<T>>
Class Inheritance
All Implemented Interfaces
net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation
Type Parameters
<T>
the generic type
Imports
java.util.Arrays, .EnumMap, .EnumSet, .Iterator, .List, .Map, .Set, java.util.concurrent.ConcurrentHashMap, .ConcurrentMap, .ScheduledExecutorService, .TimeUnit, net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation, .ExtendedStatistics.Result, .ExtendedStatistics.Statistic, org.terracotta.statistics.OperationStatistic, .ValueStatistic

The Class CompoundOperationImpl.
Author
cdennis

Field Summary

Modifier and TypeField and Description
private volatile boolean
private volatile long
private final ConcurrentMap<Set<T>, OperationImpl<T>>
private final ScheduledExecutorService
private volatile long
private volatile int
private final Map<T, OperationImpl<T>>
private final ConcurrentMap<List<Set<T>>, ExpiringStatistic<Double>>
private final OperationStatistic<T>
private final Class<T>

Constructor Summary

AccessConstructor and Description
public
CompoundOperationImpl(OperationStatistic<T>
the source
source
,
Class<T>
the type
type
,
long
the average period
averagePeriod
,
TimeUnit
the average unit
averageUnit
,
ScheduledExecutorService
the executor
executor
,
int
the history size
historySize
,
long
the history period
historyPeriod
,
TimeUnit
the history unit
historyUnit
)

Instantiates a new compound operation impl.

Method Summary

Modifier and TypeMethod and Description
public ExtendedStatistics.Result
public ExtendedStatistics.Result
pack-priv boolean

Returns:

true, if successful
expire
(long
the expiry time
expiryTime
)

Expire.

public int
public long
public long
public boolean
public ExtendedStatistics.Statistic<Double>
ratioOf(Set<T>
the numerator
numerator
,
Set<T>
the denomiator
denominator
)

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.ratioOf.

Ratio of.
public void
setAlwaysOn(boolean
the new always on
enable
)

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.setAlwaysOn.

Sets the always on.
public void
setHistory(int
the samples
samples
,
long
the time
time
,
TimeUnit
the unit
unit
)

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.setHistory.

Sets the history.
public void
setWindow(long
the time
time
,
TimeUnit
the unit
unit
)

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.setWindow.

Sets the window.
public Class<T>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

alwaysOnback to summary
private volatile boolean alwaysOn
averageNanosback to summary
private volatile long averageNanos
compoundsback to summary
private final ConcurrentMap<Set<T>, OperationImpl<T>> compounds
executorback to summary
private final ScheduledExecutorService executor
historyNanosback to summary
private volatile long historyNanos
historySizeback to summary
private volatile int historySize
operationsback to summary
private final Map<T, OperationImpl<T>> operations
ratiosback to summary
private final ConcurrentMap<List<Set<T>>, ExpiringStatistic<Double>> ratios
sourceback to summary
private final OperationStatistic<T> source
typeback to summary
private final Class<T> type

Constructor Detail

CompoundOperationImplback to summary
public CompoundOperationImpl(OperationStatistic<T> source, Class<T> type, long averagePeriod, TimeUnit averageUnit, ScheduledExecutorService executor, int historySize, long historyPeriod, TimeUnit historyUnit)

Instantiates a new compound operation impl.

Parameters
source:OperationStatistic<T>

the source

type:Class<T>

the type

averagePeriod:long

the average period

averageUnit:TimeUnit

the average unit

executor:ScheduledExecutorService

the executor

historySize:int

the history size

historyPeriod:long

the history period

historyUnit:TimeUnit

the history unit

Method Detail

componentback to summary
public ExtendedStatistics.Result component(T result)

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.component.

Doc from net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.component.

Component.

Parameters
result:T

the result

Returns:ExtendedStatistics.Result

the result

Annotations
@Override
compoundback to summary
public ExtendedStatistics.Result compound(Set<T> results)

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.compound.

Doc from net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.compound.

Compound.

Parameters
results:Set<T>

the results

Returns:ExtendedStatistics.Result

the result

Annotations
@Override
expireback to summary
pack-priv boolean expire(long expiryTime)

Expire.

Parameters
expiryTime:long

the expiry time

Returns:boolean

true, if successful

getHistorySampleSizeback to summary
public int getHistorySampleSize()

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.getHistorySampleSize.

Get the history sample size.

Returns:int

Doc from net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.getHistorySampleSize.

the history sample size

Annotations
@Override
getHistorySampleTimeback to summary
public long getHistorySampleTime(TimeUnit unit)

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.getHistorySampleTime.

Get the history sample time.

Parameters
unit:TimeUnit

Doc from net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.getHistorySampleTime.

the unit

Returns:long

Doc from net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.getHistorySampleTime.

the history sample time

Annotations
@Override
getWindowSizeback to summary
public long getWindowSize(TimeUnit unit)

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.getWindowSize.

Doc from net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.getWindowSize.

Gets the window size.

Parameters
unit:TimeUnit

the unit

Returns:long

the window size

Annotations
@Override
isAlwaysOnback to summary
public boolean isAlwaysOn()

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.isAlwaysOn.

Doc from net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.isAlwaysOn.

Checks if is always on.

Returns:boolean

true, if is always on

Annotations
@Override
ratioOfback to summary
public ExtendedStatistics.Statistic<Double> ratioOf(Set<T> numerator, Set<T> denominator)

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.ratioOf.

Doc from net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.ratioOf.

Ratio of.

Parameters
numerator:Set<T>

the numerator

denominator:Set<T>

the denomiator

Returns:ExtendedStatistics.Statistic<Double>

the statistic

Annotations
@Override
setAlwaysOnback to summary
public void setAlwaysOn(boolean enable)

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.setAlwaysOn.

Doc from net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.setAlwaysOn.

Sets the always on.

Parameters
enable:boolean

the new always on

Annotations
@Override
setHistoryback to summary
public void setHistory(int samples, long time, TimeUnit unit)

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.setHistory.

Doc from net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.setHistory.

Sets the history.

Parameters
samples:int

the samples

time:long

the time

unit:TimeUnit

the unit

Annotations
@Override
setWindowback to summary
public void setWindow(long time, TimeUnit unit)

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.setWindow.

Doc from net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.setWindow.

Sets the window.

Parameters
time:long

the time

unit:TimeUnit

the unit

Annotations
@Override
typeback to summary
public Class<T> type()

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.type.

Doc from net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation.type.

Type.

Returns:Class<T>

the class

Annotations
@Override