Top Description Fields Constructors Methods
org.terracotta.statistics.extended

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

extends Object
implements Latency
Class Inheritance
All Implemented Interfaces
org.terracotta.statistics.extended.Latency
Type Parameters
<T>
the generic type
Imports
org.terracotta.statistics.OperationStatistic, .SourceStatistic, .Time, org.terracotta.statistics.derived.EventParameterSimpleMovingAverage, .LatencySampling, org.terracotta.statistics.observer.ChainedOperationObserver, java.util.Set, java.util.concurrent.ScheduledExecutorService, .TimeUnit

The Class LatencyImpl.
Author
cdennis

Field Summary

Modifier and TypeField and Description
private boolean
private final EventParameterSimpleMovingAverage
private final SampledStatisticImpl<Double>
private final LatencySampling<T>
private final SampledStatisticImpl<Long>
private final SampledStatisticImpl<Long>
private final SourceStatistic<ChainedOperationObserver<? super T>>
private long

Constructor Summary

AccessConstructor and Description
public
LatencyImpl(OperationStatistic<T>
the statistic
statistic
,
Set<T>
the targets
targets
,
long
the average period
averagePeriod
,
TimeUnit
the average time unit
averageTimeUnit
,
ScheduledExecutorService
the executor
executor
,
int
the history size
historySize
,
long
the history period
historyPeriod
,
TimeUnit
the history time unit
historyTimeUnit
)

Instantiates a new latency impl.

Method Summary

Modifier and TypeMethod and Description
public boolean
public SampledStatistic<Double>
public synchronized boolean

Returns:

true, if successful
expire
(long
the expiry
expiry
)

Expire.

public SampledStatistic<Long>
public SampledStatistic<Long>
pack-priv void
setHistory(int
the history size
historySize
,
long
the history period
historyPeriod
,
TimeUnit
the history unit
historyTimeUnit
)

Sets the history.

pack-priv void
setWindow(long
the new window
averagePeriod
,
TimeUnit
the new window's time unit
averageTimeUnit
)

Sets the window.

pack-priv synchronized void
start()

Start.

pack-priv 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 SampledStatisticImpl<Double> averageStatistic
latencySamplerback to summary
private final LatencySampling<T> latencySampler
maximumStatisticback to summary
private final SampledStatisticImpl<Long> maximumStatistic
minimumStatisticback to summary
private final SampledStatisticImpl<Long> minimumStatistic
sourceback to summary
private final SourceStatistic<ChainedOperationObserver<? super T>> source
touchTimestampback to summary
private long touchTimestamp

Constructor Detail

LatencyImplback to summary
public LatencyImpl(OperationStatistic<T> statistic, Set<T> targets, long averagePeriod, TimeUnit averageTimeUnit, ScheduledExecutorService executor, int historySize, long historyPeriod, TimeUnit historyTimeUnit)

Instantiates a new latency impl.

Parameters
statistic:OperationStatistic<T>

the statistic

targets:Set<T>

the targets

averagePeriod:long

the average period

averageTimeUnit:TimeUnit

the average time unit

executor:ScheduledExecutorService

the executor

historySize:int

the history size

historyPeriod:long

the history period

historyTimeUnit:TimeUnit

the history time unit

Method Detail

activeback to summary
public boolean active()
averageback to summary
public SampledStatistic<Double> average()

Implements org.terracotta.statistics.extended.Latency.average.

Get the average.

Returns:SampledStatistic<Double>

Doc from org.terracotta.statistics.extended.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 SampledStatistic<Long> maximum()

Implements org.terracotta.statistics.extended.Latency.maximum.

Get the maximum.

Returns:SampledStatistic<Long>

Doc from org.terracotta.statistics.extended.Latency.maximum.

Maximum observed latency. NULL if no operation was observed.

Annotations
@Override
minimumback to summary
public SampledStatistic<Long> minimum()

Implements org.terracotta.statistics.extended.Latency.minimum.

Get the minimum

Returns:SampledStatistic<Long>

Doc from org.terracotta.statistics.extended.Latency.minimum.

Minimum observed latency. NULL if no operation was observed.

Annotations
@Override
setHistoryback to summary
pack-priv void setHistory(int historySize, long historyPeriod, TimeUnit historyTimeUnit)

Sets the history.

Parameters
historySize:int

the history size

historyPeriod:long

the history period

historyTimeUnit:TimeUnit

the history unit

setWindowback to summary
pack-priv void setWindow(long averagePeriod, TimeUnit averageTimeUnit)

Sets the window.

Parameters
averagePeriod:long

the new window

averageTimeUnit:TimeUnit

the new window's time unit

startback to summary
pack-priv synchronized void start()

Start.

touchback to summary
pack-priv synchronized void touch()