org.terracotta.statistics.extended
Class NullCompoundOperation<T extends Enum<T>>

java.lang.Object
  extended by org.terracotta.statistics.extended.NullCompoundOperation<T>
Type Parameters:
T - the generic type
All Implemented Interfaces:
CompoundOperation<T>, SamplingSupport

public final class NullCompoundOperation<T extends Enum<T>>
extends Object
implements CompoundOperation<T>

The Class NullCompoundOperation.

Author:
cdennis

Method Summary
 CountOperation<T> asCountOperation()
          Count operation.
 Result component(T result)
          Component.
 Result compound(Set<T> results)
          Compound.
 boolean expire(long expiry)
           
 int getHistorySampleSize()
          Gets the history sample size.
 long getHistorySampleTime(TimeUnit unit)
          Gets the history sample time.
 long getWindowSize(TimeUnit unit)
          Gets the window size.
static
<T extends Enum<T>>
CompoundOperation<T>
instance(Class<T> klazz)
          Instance.
 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instance

public static <T extends Enum<T>> CompoundOperation<T> instance(Class<T> klazz)
Instance.

Type Parameters:
T - the generic type
Returns:
the operation

type

public Class<T> type()
Type.

Specified by:
type in interface CompoundOperation<T extends Enum<T>>
Returns:
the class

component

public Result component(T result)
Component.

Specified by:
component in interface CompoundOperation<T extends Enum<T>>
Parameters:
result - the result
Returns:
the result

compound

public Result compound(Set<T> results)
Compound.

Specified by:
compound in interface CompoundOperation<T extends Enum<T>>
Parameters:
results - the results
Returns:
the result

asCountOperation

public CountOperation<T> asCountOperation()
Description copied from interface: CompoundOperation
Count operation.

Specified by:
asCountOperation in interface CompoundOperation<T extends Enum<T>>
Returns:
the count operation

ratioOf

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

Specified by:
ratioOf in interface CompoundOperation<T extends Enum<T>>
Parameters:
numerator - the numerator
denomiator - the denomiator
Returns:
the statistic

expire

public boolean expire(long expiry)
Specified by:
expire in interface SamplingSupport

setAlwaysOn

public void setAlwaysOn(boolean enable)
Sets the always on.

Specified by:
setAlwaysOn in interface CompoundOperation<T extends Enum<T>>
Specified by:
setAlwaysOn in interface SamplingSupport
Parameters:
enable - the new always on

setWindow

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

Specified by:
setWindow in interface CompoundOperation<T extends Enum<T>>
Parameters:
time - the time
unit - the unit

setHistory

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

Specified by:
setHistory in interface CompoundOperation<T extends Enum<T>>
Parameters:
samples - the samples
time - the time
unit - the unit

isAlwaysOn

public boolean isAlwaysOn()
Checks if is always on.

Specified by:
isAlwaysOn in interface CompoundOperation<T extends Enum<T>>
Returns:
true, if is always on

getWindowSize

public long getWindowSize(TimeUnit unit)
Description copied from interface: CompoundOperation
Gets the window size.

Specified by:
getWindowSize in interface CompoundOperation<T extends Enum<T>>
Parameters:
unit - the unit
Returns:
the window size

getHistorySampleSize

public int getHistorySampleSize()
Gets the history sample size.

Specified by:
getHistorySampleSize in interface CompoundOperation<T extends Enum<T>>
Returns:
the history sample size

getHistorySampleTime

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

Specified by:
getHistorySampleTime in interface CompoundOperation<T extends Enum<T>>
Parameters:
unit - the unit
Returns:
the history sample time


Copyright © 2016. All Rights Reserved.