Class SegmentBufferMonitor
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.SegmentBufferMonitor
-
public class SegmentBufferMonitor extends Object
This class exposesCounterStats
for allocations and de-allocations ofBuffer
instances:DIRECT_BUFFER_COUNT
: number of allocated direct byte buffers.DIRECT_BUFFER_CAPACITY
: total capacity of the allocated direct byte buffers.HEAP_BUFFER_COUNT
: number of allocated heap byte buffers.HEAP_BUFFER_CAPACITY
: total capacity of the allocated heap byte buffers.
Users of this class call
trackAllocation(Buffer)
to update above statistics.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DIRECT_BUFFER_CAPACITY
Total capacity of the allocated direct byte buffers.static String
DIRECT_BUFFER_COUNT
Number of allocated direct byte buffersstatic String
HEAP_BUFFER_CAPACITY
Total capacity of the allocated heap byte buffers.static String
HEAP_BUFFER_COUNT
Number of allocated heap byte buffers
-
Constructor Summary
Constructors Constructor Description SegmentBufferMonitor(@NotNull StatisticsProvider statisticsProvider)
Create a new instance using the passedstatisticsProvider
to expose buffer allocations.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
trackAllocation(@NotNull Buffer buffer)
Track the allocation of abuffer
and update the exposed statistics.
-
-
-
Field Detail
-
DIRECT_BUFFER_COUNT
public static final String DIRECT_BUFFER_COUNT
Number of allocated direct byte buffers- See Also:
- Constant Field Values
-
DIRECT_BUFFER_CAPACITY
public static final String DIRECT_BUFFER_CAPACITY
Total capacity of the allocated direct byte buffers.- See Also:
- Constant Field Values
-
HEAP_BUFFER_COUNT
public static final String HEAP_BUFFER_COUNT
Number of allocated heap byte buffers- See Also:
- Constant Field Values
-
HEAP_BUFFER_CAPACITY
public static final String HEAP_BUFFER_CAPACITY
Total capacity of the allocated heap byte buffers.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SegmentBufferMonitor
public SegmentBufferMonitor(@NotNull @NotNull StatisticsProvider statisticsProvider)
Create a new instance using the passedstatisticsProvider
to expose buffer allocations.- Parameters:
statisticsProvider
-
-
-
Method Detail
-
trackAllocation
public void trackAllocation(@NotNull @NotNull Buffer buffer)
Track the allocation of abuffer
and update the exposed statistics.- Parameters:
buffer
-
-
-