Class SegmentBufferMonitor
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.SegmentBufferMonitor
-
public class SegmentBufferMonitor extends Object
This class exposesCounterStatsfor allocations and de-allocations ofBufferinstances: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 StringDIRECT_BUFFER_CAPACITYTotal capacity of the allocated direct byte buffers.static StringDIRECT_BUFFER_COUNTNumber of allocated direct byte buffersstatic StringHEAP_BUFFER_CAPACITYTotal capacity of the allocated heap byte buffers.static StringHEAP_BUFFER_COUNTNumber of allocated heap byte buffers
-
Constructor Summary
Constructors Constructor Description SegmentBufferMonitor(@NotNull StatisticsProvider statisticsProvider)Create a new instance using the passedstatisticsProviderto expose buffer allocations.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidtrackAllocation(@NotNull Buffer buffer)Track the allocation of abufferand 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 passedstatisticsProviderto expose buffer allocations.- Parameters:
statisticsProvider-
-
-
Method Detail
-
trackAllocation
public void trackAllocation(@NotNull @NotNull Buffer buffer)Track the allocation of abufferand update the exposed statistics.- Parameters:
buffer-
-
-