@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(DoubleUpDownCounter upDownCounter,
double value)
Associates the
DoubleUpDownCounter with the given value. |
BatchRecorder |
put(DoubleValueRecorder valueRecorder,
double value)
Associates the
DoubleValueRecorder with the given value. |
BatchRecorder |
put(LongCounter counter,
long value)
Associates the
LongCounter with the given value. |
BatchRecorder |
put(LongUpDownCounter upDownCounter,
long value)
Associates the
LongUpDownCounter with the given value. |
BatchRecorder |
put(LongValueRecorder valueRecorder,
long value)
Associates the
LongValueRecorder with the given value. |
void |
record()
Records all of measurements at the same time.
|
BatchRecorder put(LongValueRecorder valueRecorder, long value)
LongValueRecorder
with the given value. Subsequent updates to the same
LongValueRecorder
will overwrite the previous value.valueRecorder
- the LongValueRecorder
.value
- the value to be associated with valueRecorder
.BatchRecorder put(DoubleValueRecorder valueRecorder, double value)
DoubleValueRecorder
with the given value. Subsequent updates to the same
DoubleValueRecorder
will overwrite the previous value.valueRecorder
- the DoubleValueRecorder
.value
- the value to be associated with valueRecorder
.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
.BatchRecorder put(LongUpDownCounter upDownCounter, long value)
LongUpDownCounter
with the given value. Subsequent updates to the same
LongCounter
will overwrite the previous value.upDownCounter
- the LongCounter
.value
- the value to be associated with counter
.BatchRecorder put(DoubleUpDownCounter upDownCounter, double value)
DoubleUpDownCounter
with the given value. Subsequent updates to the same
DoubleCounter
will overwrite the previous value.upDownCounter
- the DoubleCounter
.value
- the value to be associated with counter
.void record()
This method records all measurements every time it is called, so make sure it is not called twice if not needed.