Class Buffer
java.lang.Object
io.prometheus.metrics.core.metrics.Buffer
Metrics support concurrent write and scrape operations.
This is implemented by switching to a Buffer when the scrape starts, and applying the values from the buffer after the scrape ends.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) ReentrantLockprivate static final long(package private) Conditionprivate intprivate double[]private boolean(package private) ReentrantLockprivate final AtomicLong[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) booleanappend(double value) private voiddoAppend(double amount) (package private) voidreset()Must be called by the runnable in the run() method.(package private) <T extends DataPointSnapshot>
T
-
Field Details
-
bufferActiveBit
private static final long bufferActiveBit- See Also:
-
stripedObservationCounts
-
observationBuffer
private double[] observationBuffer -
bufferPos
private int bufferPos -
reset
private boolean reset -
appendLock
ReentrantLock appendLock -
runLock
ReentrantLock runLock -
bufferFilled
Condition bufferFilled
-
-
Constructor Details
-
Buffer
Buffer()
-
-
Method Details
-
append
boolean append(double value) -
doAppend
private void doAppend(double amount) -
reset
void reset()Must be called by the runnable in the run() method. -
run
-