org.terracotta.statistics.extended
Interface CompoundOperation<T extends Enum<T>>

Type Parameters:
T - the generic type
All Superinterfaces:
SamplingSupport
All Known Implementing Classes:
CompoundOperationImpl, NullCompoundOperation

public interface CompoundOperation<T extends Enum<T>>
extends SamplingSupport

The Interface Operation.


Method Summary
 CountOperation<T> asCountOperation()
          Count operation.
 Result component(T result)
          Component.
 Result compound(Set<T> results)
          Compound.
 int getHistorySampleSize()
          Gets the history sample size.
 long getHistorySampleTime(TimeUnit unit)
          Gets the history sample time.
 long getWindowSize(TimeUnit unit)
          Gets the window size.
 boolean isAlwaysOn()
          Checks if is always on.
 SampledStatistic<Double> ratioOf(Set<T> numerator, Set<T> denomiator)
          Ratio of.
 void setAlwaysOn(boolean enable)
          Sets the always on.
 void setHistory(int samples, long time, TimeUnit unit)
          Sets the history.
 void setWindow(long time, TimeUnit unit)
          Sets the window.
 Class<T> type()
          Type.
 
Methods inherited from interface org.terracotta.statistics.extended.SamplingSupport
expire
 

Method Detail

type

Class<T> type()
Type.

Returns:
the class

component

Result component(T result)
Component.

Parameters:
result - the result
Returns:
the result

compound

Result compound(Set<T> results)
Compound.

Parameters:
results - the results
Returns:
the result

asCountOperation

CountOperation<T> asCountOperation()
Count operation.

Returns:
the count operation

ratioOf

SampledStatistic<Double> ratioOf(Set<T> numerator,
                                 Set<T> denomiator)
Ratio of.

Parameters:
numerator - the numerator
denomiator - the denomiator
Returns:
the statistic

setAlwaysOn

void setAlwaysOn(boolean enable)
Sets the always on.

Specified by:
setAlwaysOn in interface SamplingSupport
Parameters:
enable - the new always on

isAlwaysOn

boolean isAlwaysOn()
Checks if is always on.

Returns:
true, if is always on

setWindow

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

Parameters:
time - the time
unit - the unit

setHistory

void setHistory(int samples,
                long time,
                TimeUnit unit)
Sets the history.

Parameters:
samples - the samples
time - the time
unit - the unit

getWindowSize

long getWindowSize(TimeUnit unit)
Gets the window size.

Parameters:
unit - the unit
Returns:
the window size

getHistorySampleSize

int getHistorySampleSize()
Gets the history sample size.

Returns:
the history sample size

getHistorySampleTime

long getHistorySampleTime(TimeUnit unit)
Gets the history sample time.

Parameters:
unit - the unit
Returns:
the history sample time


Copyright © 2016. All Rights Reserved.