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

pack-priv Class SampledStatistic<T extends java.lang.Number>

extends Object
Class Inheritance
Type Parameters
<T>
the generic type
Imports
java.util.List, java.util.concurrent.ScheduledExecutorService, .TimeUnit, org.terracotta.statistics.ValueStatistic, org.terracotta.statistics.archive.StatisticArchive, .StatisticSampler, .Timestamped

The Class SampledStatistic.
Author
cdennis

Field Summary

Modifier and TypeField and Description
private final StatisticArchive<T>
history

The history.

private final StatisticSampler<T>
sampler

The sampler.

Constructor Summary

AccessConstructor and Description
public
SampledStatistic(ValueStatistic<T>
the statistic
statistic
,
ScheduledExecutorService
the executor
executor
,
int
the history size
historySize
,
long
the period nanos
periodNanos
)

Instantiates a new sampled statistic.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
adjust(int
the history size
historySize
,
long
the history nanos
historyNanos
)

Adjust.

public List<Timestamped<T>>

Returns:

the list
history
()

History.

public void
startSampling()

Start sampling.

public void
stopSampling()

Stop sampling.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

historyback to summary
private final StatisticArchive<T> history

The history.

samplerback to summary
private final StatisticSampler<T> sampler

The sampler.

Constructor Detail

SampledStatisticback to summary
public SampledStatistic(ValueStatistic<T> statistic, ScheduledExecutorService executor, int historySize, long periodNanos)

Instantiates a new sampled statistic.

Parameters
statistic:ValueStatistic<T>

the statistic

executor:ScheduledExecutorService

the executor

historySize:int

the history size

periodNanos:long

the period nanos

Method Detail

adjustback to summary
pack-priv void adjust(int historySize, long historyNanos)

Adjust.

Parameters
historySize:int

the history size

historyNanos:long

the history nanos

historyback to summary
public List<Timestamped<T>> history()

History.

Returns:List<Timestamped<T>>

the list

startSamplingback to summary
public void startSampling()

Start sampling.

stopSamplingback to summary
public void stopSampling()

Stop sampling.