Top Fields Constructors Methods
org.terracotta.statistics.derived.latency

public Class LatencyPeriodAccumulator

extends Object
implements LatencyStatistic, ChainedEventObserver
Class Inheritance
All Implemented Interfaces
org.terracotta.statistics.observer.ChainedEventObserver, org.terracotta.statistics.observer.ChainedObserver, org.terracotta.statistics.derived.latency.LatencyStatistic
Imports
org.terracotta.statistics.observer.ChainedEventObserver

Author
Mathieu Carbou

Field Summary

Modifier and TypeField and Description
private final LatencyAccumulator
private final long
private final long

Constructor Summary

AccessConstructor and Description
pack-priv
LatencyPeriodAccumulator(long start, long length, long... latencies)

Method Summary

Modifier and TypeMethod and Description
public LatencyAccumulator
public double
public long

Returns:

End time (exclusive) for this period.
end
()

public void
event(long
the clock at event completion in ns
timeNs
,
long
the event latency in ns
latencyNs
)

Implements org.terracotta.statistics.observer.ChainedEventObserver.event.

Called to indicate an event happened.
public boolean
isAfter(long time)

public boolean
isBefore(long time)

public Long
public Long
public long

Returns:

Start time (inclusive) for this period.
start
()

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public boolean
tryAccumulate(long time, long latency)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

accumulatorback to summary
private final LatencyAccumulator accumulator
endback to summary
private final long end
startback to summary
private final long start

Constructor Detail

LatencyPeriodAccumulatorback to summary
pack-priv LatencyPeriodAccumulator(long start, long length, long... latencies)

Method Detail

accumulatorback to summary
public LatencyAccumulator accumulator()
averageback to summary
public double average()

Implements org.terracotta.statistics.derived.latency.LatencyStatistic.average.

Returns:double

Doc from org.terracotta.statistics.derived.latency.LatencyStatistic.average.

The average in ns or NaN if no value

Annotations
@Override
endback to summary
public long end()
Returns:long

End time (exclusive) for this period.

eventback to summary
public void event(long timeNs, long latencyNs)

Implements org.terracotta.statistics.observer.ChainedEventObserver.event.

Doc from org.terracotta.statistics.observer.ChainedEventObserver.event.

Called to indicate an event happened.

Parameters
timeNs:long

the clock at event completion in ns

latencyNs:long

the event latency in ns

Annotations
@Override
isAfterback to summary
public boolean isAfter(long time)
isBeforeback to summary
public boolean isBefore(long time)
maximumback to summary
public Long maximum()

Implements org.terracotta.statistics.derived.latency.LatencyStatistic.maximum.

Returns:Long

Doc from org.terracotta.statistics.derived.latency.LatencyStatistic.maximum.

The maximum in ns or null if it does not exist yet

Annotations
@Override
minimumback to summary
public Long minimum()

Implements org.terracotta.statistics.derived.latency.LatencyStatistic.minimum.

Returns:Long

Doc from org.terracotta.statistics.derived.latency.LatencyStatistic.minimum.

The minimum in ns or null if it does not exist yet

Annotations
@Override
startback to summary
public long start()
Returns:long

Start time (inclusive) for this period.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
tryAccumulateback to summary
public boolean tryAccumulate(long time, long latency)