@ThreadSafe public interface BatchRecorder
This class is equivalent with individually calling record on every Measure, but has the advantage that all these operations are recorded atomically and it is more efficient.
| Modifier and Type | Method and Description |
|---|---|
BatchRecorder |
put(DoubleCounter counter,
double value)
Associates the
DoubleCounter with the given value. |
BatchRecorder |
put(DoubleMeasure measure,
double value)
Associates the
DoubleMeasure with the given value. |
BatchRecorder |
put(LongCounter counter,
long value)
Associates the
LongCounter with the given value. |
BatchRecorder |
put(LongMeasure measure,
long value)
Associates the
LongMeasure with the given value. |
void |
record()
Records all of the measures at the same time.
|
BatchRecorder put(LongMeasure measure, long value)
LongMeasure with the given value. Subsequent updates to the same LongMeasure will overwrite the previous value.measure - the LongMeasure.value - the value to be associated with measure.BatchRecorder put(DoubleMeasure measure, double value)
DoubleMeasure with the given value. Subsequent updates to the same
DoubleMeasure will overwrite the previous value.measure - the DoubleMeasure.value - the value to be associated with measure.BatchRecorder put(LongCounter counter, long value)
LongCounter with the given value. Subsequent updates to the same LongCounter will overwrite the previous value.counter - the LongCounter.value - the value to be associated with counter.BatchRecorder put(DoubleCounter counter, double value)
DoubleCounter with the given value. Subsequent updates to the same
DoubleCounter will overwrite the previous value.counter - the DoubleCounter.value - the value to be associated with counter.void record()
This method records all of the measurements every time it is called, so make sure it is not called twice if not needed.