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

public final Class NullCompoundOperation<T extends java.lang.Enum<T>>

extends Object
implements CompoundOperation<T extends Enum<T>>
Class Inheritance
All Implemented Interfaces
org.terracotta.statistics.extended.CompoundOperation, org.terracotta.statistics.extended.SamplingSupport
Type Parameters
<T>
the generic type
Imports
org.terracotta.statistics.archive.Timestamped, java.util.Collections, .EnumSet, .HashMap, .List, .Map, java.util.concurrent.TimeUnit

The Class NullCompoundOperation.
Author
cdennis

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class
pack-priv static class
NullCompoundOperation.NullSampledStatistic<T extends Number>

Null statistic class

Field Summary

Modifier and TypeField and Description
private static final CompoundOperation<T extends Enum<T>>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public CountOperation<T>
public Result
public Result
public boolean
public int
public long
public long
public static <
the generic type
T extends Enum<T>
>
CompoundOperation<T>

Returns:

the operation
instance
(Class<T>
concrete class of <T>
klazz
)

Instance.

public boolean
public SampledStatistic<Double>
ratioOf(EnumSet<T>
the numerator
numerator
,
EnumSet<T>
the denomiator
denominator
)

Implements org.terracotta.statistics.extended.CompoundOperation.ratioOf.

Ratio of.
public void
setAlwaysOn(boolean
the new always on
enable
)

Implements org.terracotta.statistics.extended.CompoundOperation.setAlwaysOn.

Sets the always on.
public void
setHistory(int
the samples
samples
,
long
the time
time
,
TimeUnit
the unit
unit
)

Implements org.terracotta.statistics.extended.CompoundOperation.setHistory.

Sets the history.
public void
setWindow(long
the time
time
,
TimeUnit
the unit
unit
)

Implements org.terracotta.statistics.extended.CompoundOperation.setWindow.

Sets the window.
public Class<T>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
private static final CompoundOperation<T extends Enum<T>> INSTANCE
Annotations
@SuppressWarnings:rawtypes

Constructor Detail

NullCompoundOperationback to summary
private NullCompoundOperation()

Method Detail

asCountOperationback to summary
public CountOperation<T> asCountOperation()

Implements org.terracotta.statistics.extended.CompoundOperation.asCountOperation.

Doc from org.terracotta.statistics.extended.CompoundOperation.asCountOperation.

Count operation.

Returns:CountOperation<T>

the count operation

Annotations
@Override
componentback to summary
public Result component(T result)

Implements org.terracotta.statistics.extended.CompoundOperation.component.

Doc from org.terracotta.statistics.extended.CompoundOperation.component.

Component.

Parameters
result:T

the result

Returns:Result

the result

Annotations
@Override
compoundback to summary
public Result compound(EnumSet<T> results)

Implements org.terracotta.statistics.extended.CompoundOperation.compound.

Doc from org.terracotta.statistics.extended.CompoundOperation.compound.

Compound.

Parameters
results:EnumSet<T>

the results

Returns:Result

the result

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

Implements org.terracotta.statistics.extended.SamplingSupport.expire.

Annotations
@Override
getHistorySampleSizeback to summary
public int getHistorySampleSize()

Implements org.terracotta.statistics.extended.CompoundOperation.getHistorySampleSize.

Doc from org.terracotta.statistics.extended.CompoundOperation.getHistorySampleSize.

Gets the history sample size.

Returns:int

the history sample size

Annotations
@Override
getHistorySampleTimeback to summary
public long getHistorySampleTime(TimeUnit unit)

Implements org.terracotta.statistics.extended.CompoundOperation.getHistorySampleTime.

Doc from org.terracotta.statistics.extended.CompoundOperation.getHistorySampleTime.

Gets the history sample time.

Parameters
unit:TimeUnit

the unit

Returns:long

the history sample time

Annotations
@Override
getWindowSizeback to summary
public long getWindowSize(TimeUnit unit)

Implements org.terracotta.statistics.extended.CompoundOperation.getWindowSize.

Doc from org.terracotta.statistics.extended.CompoundOperation.getWindowSize.

Gets the window size.

Parameters
unit:TimeUnit

the unit

Returns:long

the window size

Annotations
@Override
instanceback to summary
public static <T extends Enum<T>> CompoundOperation<T> instance(Class<T> klazz)

Instance.

Parameters
<T>
the generic type
klazz:Class<T>

concrete class of <T>

Returns:CompoundOperation<T>

the operation

Annotations
@SuppressWarnings:unchecked
isAlwaysOnback to summary
public boolean isAlwaysOn()

Implements org.terracotta.statistics.extended.CompoundOperation.isAlwaysOn.

Doc from org.terracotta.statistics.extended.CompoundOperation.isAlwaysOn.

Checks if is always on.

Returns:boolean

true, if is always on

Annotations
@Override
ratioOfback to summary
public SampledStatistic<Double> ratioOf(EnumSet<T> numerator, EnumSet<T> denominator)

Implements org.terracotta.statistics.extended.CompoundOperation.ratioOf.

Doc from org.terracotta.statistics.extended.CompoundOperation.ratioOf.

Ratio of.

Parameters
numerator:EnumSet<T>

the numerator

denominator:EnumSet<T>

the denomiator

Returns:SampledStatistic<Double>

the statistic

Annotations
@Override
setAlwaysOnback to summary
public void setAlwaysOn(boolean enable)

Implements org.terracotta.statistics.extended.CompoundOperation.setAlwaysOn.

Doc from org.terracotta.statistics.extended.CompoundOperation.setAlwaysOn.

Sets the always on.

Parameters
enable:boolean

the new always on

Annotations
@Override
setHistoryback to summary
public void setHistory(int samples, long time, TimeUnit unit)

Implements org.terracotta.statistics.extended.CompoundOperation.setHistory.

Doc from org.terracotta.statistics.extended.CompoundOperation.setHistory.

Sets the history.

Parameters
samples:int

the samples

time:long

the time

unit:TimeUnit

the unit

Annotations
@Override
setWindowback to summary
public void setWindow(long time, TimeUnit unit)

Implements org.terracotta.statistics.extended.CompoundOperation.setWindow.

Doc from org.terracotta.statistics.extended.CompoundOperation.setWindow.

Sets the window.

Parameters
time:long

the time

unit:TimeUnit

the unit

Annotations
@Override
typeback to summary
public Class<T> type()

Implements org.terracotta.statistics.extended.CompoundOperation.type.

Doc from org.terracotta.statistics.extended.CompoundOperation.type.

Type.

Returns:Class<T>

the class

Annotations
@Override
org.terracotta.statistics.extended back to summary

pack-priv final Class NullCompoundOperation.NullLatency

extends Object
implements Latency
Class Inheritance
  • java.lang.Object
  • org.terracotta.statistics.extended.NullCompoundOperation.NullLatency
All Implemented Interfaces
org.terracotta.statistics.extended.Latency

Noop latency class
Author
cdennis

Field Summary

Modifier and TypeField and Description
private static final Latency

Constructor Summary

AccessConstructor and Description
private
NullLatency()

Private constructor

Method Summary

Modifier and TypeMethod and Description
public SampledStatistic<Double>
pack-priv static Latency

Returns:

singleton instance
instance
()

Instance accessor

public SampledStatistic<Long>
public SampledStatistic<Long>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
private static final Latency INSTANCE

Constructor Detail

NullLatencyback to summary
private NullLatency()

Private constructor

Method Detail

averageback to summary
public SampledStatistic<Double> average()

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

average

Returns:SampledStatistic<Double>

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

Average observed latency. NULL if no operation was observed.

Annotations
@Override
instanceback to summary
pack-priv static Latency instance()

Instance accessor

Returns:Latency

singleton instance

maximumback to summary
public SampledStatistic<Long> maximum()

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

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.

minimum

Returns:SampledStatistic<Long>

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

Minimum observed latency. NULL if no operation was observed.

Annotations
@Override
org.terracotta.statistics.extended back to summary

pack-priv final Class NullCompoundOperation.NullOperation

extends Object
implements Result
Class Inheritance
  • java.lang.Object
  • org.terracotta.statistics.extended.NullCompoundOperation.NullOperation
All Implemented Interfaces
org.terracotta.statistics.extended.Result

Null result object
Author
cdennis

Field Summary

Modifier and TypeField and Description
private static final Result

Constructor Summary

AccessConstructor and Description
private
NullOperation()

Instantiates a new null operation.

Method Summary

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

Returns:

singleton instance
instance
()

Instance method

public Latency
public SampledStatistic<Double>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
private static final Result INSTANCE

Constructor Detail

NullOperationback to summary
private NullOperation()

Instantiates a new null operation.

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
instanceback to summary
pack-priv static Result instance()

Instance method

Returns:Result

singleton instance

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
org.terracotta.statistics.extended back to summary

pack-priv final Class NullCompoundOperation.NullSampledStatistic<T extends java.lang.Number>

extends Object
implements SampledStatistic<T extends Enum<T>>
Class Inheritance
  • java.lang.Object
  • org.terracotta.statistics.extended.NullCompoundOperation.NullSampledStatistic
All Implemented Interfaces
org.terracotta.statistics.extended.SampledStatistic

Null statistic class
Author
cdennis

Field Summary

Modifier and TypeField and Description
private static final Map<StatisticType, SampledStatistic<?>>
private final StatisticType
private final T

Constructor Summary

AccessConstructor and Description
private
NullSampledStatistic(T
initial value
value
,
StatisticType
type of statistic to track
type
)

Constructor

Method Summary

Modifier and TypeMethod and Description
public boolean
public List<Timestamped<T>>
public List<Timestamped<T>>
history(long
starting point of history in ms
since
)

Implements org.terracotta.statistics.extended.SampledStatistic.history.

History, from a given time in ms
pack-priv static <T extends Number> SampledStatistic<T>
public StatisticType
public T
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

COMMONback to summary
private static final Map<StatisticType, SampledStatistic<?>> COMMON
typeback to summary
private final StatisticType type
valueback to summary
private final T value

Constructor Detail

NullSampledStatisticback to summary
private NullSampledStatistic(T value, StatisticType type)

Constructor

Parameters
value:T

initial value

type:StatisticType

type of statistic to track

Method Detail

activeback to summary
public boolean active()

Implements org.terracotta.statistics.extended.SampledStatistic.active.

Doc from org.terracotta.statistics.extended.SampledStatistic.active.

Active.

Returns:boolean

true, if successful

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

Implements org.terracotta.statistics.extended.SampledStatistic.history.

Doc from org.terracotta.statistics.extended.SampledStatistic.history.

History.

Returns:List<Timestamped<T>>

the list

Annotations
@Override
historyback to summary
public List<Timestamped<T>> history(long since)

Implements org.terracotta.statistics.extended.SampledStatistic.history.

Doc from org.terracotta.statistics.extended.SampledStatistic.history.

History, from a given time in ms

Parameters
since:long

starting point of history in ms

Returns:List<Timestamped<T>>

the list

Annotations
@Override
instanceback to summary
pack-priv static <T extends Number> SampledStatistic<T> instance(StatisticType type)
Annotations
@SuppressWarnings:unchecked
typeback to summary
public StatisticType type()

Implements org.terracotta.statistics.extended.SampledStatistic.type.

Annotations
@Override
valueback to summary
public T value()

Implements org.terracotta.statistics.extended.SampledStatistic.value.

Doc from org.terracotta.statistics.extended.SampledStatistic.value.

Value.

Returns:T

the t

Annotations
@Override