public class SegmentBufferMonitor
extends java.lang.Object
CounterStats
for allocations and de-allocations
of Buffer
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.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DIRECT_BUFFER_CAPACITY
Total capacity of the allocated direct byte buffers.
|
static java.lang.String |
DIRECT_BUFFER_COUNT
Number of allocated direct byte buffers
|
static java.lang.String |
HEAP_BUFFER_CAPACITY
Total capacity of the allocated heap byte buffers.
|
static java.lang.String |
HEAP_BUFFER_COUNT
Number of allocated heap byte buffers
|
Constructor and Description |
---|
SegmentBufferMonitor(@NotNull StatisticsProvider statisticsProvider)
Create a new instance using the passed
statisticsProvider to expose
buffer allocations. |
Modifier and Type | Method and Description |
---|---|
void |
trackAllocation(@NotNull Buffer buffer)
Track the allocation of a
buffer and update the exposed statistics. |
public static final java.lang.String DIRECT_BUFFER_COUNT
public static final java.lang.String DIRECT_BUFFER_CAPACITY
public static final java.lang.String HEAP_BUFFER_COUNT
public static final java.lang.String HEAP_BUFFER_CAPACITY
public SegmentBufferMonitor(@NotNull @NotNull StatisticsProvider statisticsProvider)
statisticsProvider
to expose
buffer allocations.statisticsProvider
- public void trackAllocation(@NotNull @NotNull Buffer buffer)
buffer
and update the exposed statistics.buffer
- Copyright © 2012–2022 The Apache Software Foundation. All rights reserved.