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

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

extends Object
implements Latency
Class Inheritance
All Implemented Interfaces
net.sf.ehcache.statistics.extended.ExtendedStatistics.Latency
Type Parameters
<T>
the generic type
Imports
java.util.List, .Set, java.util.concurrent.ScheduledExecutorService, .TimeUnit, net.sf.ehcache.statistics.extended.ExtendedStatistics.Latency, .ExtendedStatistics.Statistic, org.terracotta.statistics.SourceStatistic, .Time, .ValueStatistic, org.terracotta.statistics.archive.Timestamped, org.terracotta.statistics.derived.EventParameterSimpleMovingAverage, .LatencySampling, org.terracotta.statistics.observer.ChainedOperationObserver

The Class LatencyImpl.
Author
cdennis

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
LatencyImpl.StatisticImpl<
the generic type
T extends Number
>

The Class StatisticImpl.

Field Summary

Modifier and TypeField and Description
private boolean
private final EventParameterSimpleMovingAverage
private final LatencyImpl<T>.StatisticImpl<Double>
private final LatencySampling<T>
private final LatencyImpl<T>.StatisticImpl<Long>
private final LatencyImpl<T>.StatisticImpl<Long>
private final SourceStatistic<ChainedOperationObserver<T>>
private long

Constructor Summary

AccessConstructor and Description
public
LatencyImpl(SourceStatistic<ChainedOperationObserver<T>>
the statistic
statistic
,
Set<T>
the targets
targets
,
long
the average nanos
averageNanos
,
ScheduledExecutorService
the executor
executor
,
int
the history size
historySize
,
long
the history nanos
historyNanos
)

Instantiates a new latency impl.

Method Summary

Modifier and TypeMethod and Description
public ExtendedStatistics.Statistic<Double>
public synchronized boolean

Returns:

true, if successful
expire
(long
the expiry
expiry
)

Expire.

public ExtendedStatistics.Statistic<Long>
public ExtendedStatistics.Statistic<Long>
pack-priv void
setHistory(int
the history size
historySize
,
long
the history nanos
historyNanos
)

Sets the history.

pack-priv void
setWindow(long
the new window
averageNanos
)

Sets the window.

pack-priv synchronized void
start()

Start.

private synchronized void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

activeback to summary
private boolean active
averageback to summary
private final EventParameterSimpleMovingAverage average
averageStatisticback to summary
private final LatencyImpl<T>.StatisticImpl<Double> averageStatistic
latencySamplerback to summary
private final LatencySampling<T> latencySampler
maximumStatisticback to summary
private final LatencyImpl<T>.StatisticImpl<Long> maximumStatistic
minimumStatisticback to summary
private final LatencyImpl<T>.StatisticImpl<Long> minimumStatistic
sourceback to summary
private final SourceStatistic<ChainedOperationObserver<T>> source
touchTimestampback to summary
private long touchTimestamp

Constructor Detail

LatencyImplback to summary
public LatencyImpl(SourceStatistic<ChainedOperationObserver<T>> statistic, Set<T> targets, long averageNanos, ScheduledExecutorService executor, int historySize, long historyNanos)

Instantiates a new latency impl.

Parameters
statistic:SourceStatistic<ChainedOperationObserver<T>>

the statistic

targets:Set<T>

the targets

averageNanos:long

the average nanos

executor:ScheduledExecutorService

the executor

historySize:int

the history size

historyNanos:long

the history nanos

Method Detail

averageback to summary
public ExtendedStatistics.Statistic<Double> average()

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Latency.average.

Get the average.

Returns:ExtendedStatistics.Statistic<Double>

Doc from net.sf.ehcache.statistics.extended.ExtendedStatistics.Latency.average.

Average observed latency. NULL if no operation was observed.

Annotations
@Override
expireback to summary
public synchronized boolean expire(long expiry)

Expire.

Parameters
expiry:long

the expiry

Returns:boolean

true, if successful

maximumback to summary
public ExtendedStatistics.Statistic<Long> maximum()

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Latency.maximum.

Get the maximum.

Returns:ExtendedStatistics.Statistic<Long>

Doc from net.sf.ehcache.statistics.extended.ExtendedStatistics.Latency.maximum.

Maximum observed latency. NULL if no operation was observed.

Annotations
@Override
minimumback to summary
public ExtendedStatistics.Statistic<Long> minimum()

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Latency.minimum.

Get the minimum

Returns:ExtendedStatistics.Statistic<Long>

Doc from net.sf.ehcache.statistics.extended.ExtendedStatistics.Latency.minimum.

Minimum observed latency. NULL if no operation was observed.

setHistoryback to summary
pack-priv void setHistory(int historySize, long historyNanos)

Sets the history.

Parameters
historySize:int

the history size

historyNanos:long

the history nanos

setWindowback to summary
pack-priv void setWindow(long averageNanos)

Sets the window.

Parameters
averageNanos:long

the new window

startback to summary
pack-priv synchronized void start()

Start.

touchback to summary
private synchronized void touch()
net.sf.ehcache.statistics.extended back to summary

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

extends AbstractStatistic<T extends Enum<T>>
Class Inheritance
Type Parameters
<T>
the generic type

The Class StatisticImpl.

Constructor Summary

AccessConstructor and Description
public
StatisticImpl(ValueStatistic<T>
the value
value
,
ScheduledExecutorService
the executor
executor
,
int
the history size
historySize
,
long
the history nanos
historyNanos
)

Instantiates a new statistic impl.

Method Summary

Modifier and TypeMethod and Description
public boolean
public List<Timestamped<T>>
public T
Inherited from net.sf.ehcache.statistics.extended.AbstractStatistic:
setHistorystartSamplingstopSampling

Constructor Detail

StatisticImplback to summary
public StatisticImpl(ValueStatistic<T> value, ScheduledExecutorService executor, int historySize, long historyNanos)

Instantiates a new statistic impl.

Parameters
value:ValueStatistic<T>

the value

executor:ScheduledExecutorService

the executor

historySize:int

the history size

historyNanos:long

the history nanos

Method Detail

activeback to summary
public boolean active()

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Statistic.active.

Doc from net.sf.ehcache.statistics.extended.ExtendedStatistics.Statistic.active.

Active.

Returns:boolean

true, if successful

Annotations
@Override
historyback to summary
public List<Timestamped<T>> history() throws UnsupportedOperationException

Overrides net.sf.ehcache.statistics.extended.AbstractStatistic.history.

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Statistic.history.

Doc from net.sf.ehcache.statistics.extended.AbstractStatistic.history.

History.

Returns:List<Timestamped<T>>

Doc from net.sf.ehcache.statistics.extended.ExtendedStatistics.Statistic.history.

the list

Annotations
@Override
valueback to summary
public T value()

Overrides net.sf.ehcache.statistics.extended.AbstractStatistic.value.

Implements net.sf.ehcache.statistics.extended.ExtendedStatistics.Statistic.value.

Doc from net.sf.ehcache.statistics.extended.AbstractStatistic.value.

Value.

Returns:T

Doc from net.sf.ehcache.statistics.extended.ExtendedStatistics.Statistic.value.

the t

Annotations
@Override