|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.counters.OneShotInstrument<T>
T - public class OneShotInstrument<T>
An Instrument that records a single value at the moment that it
is constructed and always reports the same value and lastModified time.
| Constructor Summary | |
|---|---|
OneShotInstrument(T value)
|
|
| Method Summary | |
|---|---|
T |
getValue()
Obtain a sample. |
long |
lastModified()
Obtain the timestamp for the last collected sample. |
void |
setValue(T value,
long timestamp)
Set the current value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OneShotInstrument(T value)
| Method Detail |
|---|
public T getValue()
IInstrument
getValue in interface IInstrument<T>public long lastModified()
IInstrument
lastModified in interface IInstrument<T>
public void setValue(T value,
long timestamp)
IInstrument
setValue in interface IInstrument<T>value - The sampled value.timestamp - The timestamp for that sample.
UnsupportedOperationException - always
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||