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

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

extends Object
implements Result
Class Inheritance
All Implemented Interfaces
org.terracotta.statistics.extended.Result
Type Parameters
<T>
the generic type
Imports
edu.umd.cs.findbugs.annotations.SuppressFBWarnings, org.terracotta.statistics.OperationStatistic, java.util.Set, java.util.concurrent.ScheduledExecutorService, .TimeUnit

The Class OperationImpl.
Author
cdennis

Field Summary

Modifier and TypeField and Description
private final SemiExpiringSampledStatistic<Long>
count

The count.

private final LatencyImpl<T>
latency

The latency.

private final RateImpl<T>
rate

The rate.

Constructor Summary

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

Instantiates a new operation impl.

Method Summary

Modifier and TypeMethod and Description
public SampledStatistic<Long>
pack-priv boolean

Returns:

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

Expire.

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

Sets the history.

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

Sets the window.

pack-priv void
start()

Start.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

countback to summary
private final SemiExpiringSampledStatistic<Long> count

The count.

latencyback to summary
private final LatencyImpl<T> latency

The latency.

rateback to summary
private final RateImpl<T> rate

The rate.

Constructor Detail

ResultImplback to summary
public ResultImpl(OperationStatistic<T> source, Set<T> targets, long averagePeriod, TimeUnit averageTimeUnit, ScheduledExecutorService executor, int historySize, long historyPeriod, TimeUnit historyTimeUnit)

Instantiates a new operation impl.

Parameters
source:OperationStatistic<T>

the source

targets:Set<T>

the targets

averagePeriod:long

the average period

executor:ScheduledExecutorService

the executor

historySize:int

the history size

historyPeriod:long

the history period

Method Detail

countback to summary
public SampledStatistic<Long> count()

Implements org.terracotta.statistics.extended.Result.count.

Doc from org.terracotta.statistics.extended.Result.count.

Count.

Returns:SampledStatistic<Long>

the statistic

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

Expire.

Parameters
expiryTime:long

the expiry time

Returns:boolean

true, if successful

Annotations
@SuppressFBWarnings:NS_DANGEROUS_NON_SHORT_CIRCUIT
latencyback to summary
public Latency latency() throws UnsupportedOperationException

Implements org.terracotta.statistics.extended.Result.latency.

Doc from org.terracotta.statistics.extended.Result.latency.

Latency.

Returns:Latency

the latency

Annotations
@Override
rateback to summary
public SampledStatistic<Double> rate()

Implements org.terracotta.statistics.extended.Result.rate.

Doc from org.terracotta.statistics.extended.Result.rate.

Rate.

Returns:SampledStatistic<Double>

the statistic

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

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

Sets the window.

Parameters
averagePeriod:long

the new window period

averageTimeUnit:TimeUnit

the period's time unit

startback to summary
pack-priv void start()

Start.