ByteBufAllocator implementation that does not pool anything.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final UnpooledByteBufAllocator | DEFAULT
Default instance which uses leak-detection for direct buffers.
|
| private final boolean | |
| private final UnpooledByteBufAllocator. | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | UnpooledByteBufAllocator(boolean
true if buffer(int) should try to allocate a direct buffer rather than
a heap bufferCreate a new instance which uses leak-detection for direct buffers. |
| public | UnpooledByteBufAllocator(boolean
true if buffer(int) should try to allocate a direct buffer rather than
a heap buffertrue if the leak-detection should be disabled completely for this
allocator. This can be useful if the user just want to depend on the GC to handle
direct buffers when not explicit released.Create a new instance |
| public | UnpooledByteBufAllocator(boolean
true if buffer(int) should try to allocate a direct buffer rather than
a heap buffertrue if the leak-detection should be disabled completely for this
allocator. This can be useful if the user just want to depend on the GC to handle
direct buffers when not explicit released.true if we should try to use PlatformDependent#allocateDirectNoCleaner(int)
to allocate direct memory.Create a new instance |
| Modifier and Type | Method and Description |
|---|---|
| public CompositeByteBuf | compositeDirectBuffer(int maxNumComponents)
Overrides io. Implements io. CompositeByteBuf with the given maximum number of components that can be stored in it.
|
| public CompositeByteBuf | compositeHeapBuffer(int maxNumComponents)
Overrides io. Implements io. CompositeByteBuf with the given maximum number of components that can be stored in it.
|
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public boolean | isDirectBufferPooled()
Implements io. true if direct ByteBuf's are pooled
|
| public ByteBufAllocatorMetric | metric()
Implements io. ByteBufAllocatorMetric for a ByteBufAllocator.
|
| protected ByteBuf | newDirectBuffer(int initialCapacity, int maxCapacity)
Implements abstract io. ByteBuf with the given initialCapacity and maxCapacity.
|
| protected ByteBuf | newHeapBuffer(int initialCapacity, int maxCapacity)
Implements abstract io. ByteBuf with the given initialCapacity and maxCapacity.
|
| DEFAULT | back to summary |
|---|---|
| public static final UnpooledByteBufAllocator DEFAULT Hides io. Default instance which uses leak-detection for direct buffers. | |
| disableLeakDetector | back to summary |
|---|---|
| private final boolean disableLeakDetector | |
| metric | back to summary |
|---|---|
| private final UnpooledByteBufAllocator. | |
| noCleaner | back to summary |
|---|---|
| private final boolean noCleaner | |
| UnpooledByteBufAllocator | back to summary |
|---|---|
| public UnpooledByteBufAllocator(boolean preferDirect) Create a new instance which uses leak-detection for direct buffers.
| |
| UnpooledByteBufAllocator | back to summary |
|---|---|
| public UnpooledByteBufAllocator(boolean preferDirect, boolean disableLeakDetector) Create a new instance
| |
| UnpooledByteBufAllocator | back to summary |
|---|---|
| public UnpooledByteBufAllocator(boolean preferDirect, boolean disableLeakDetector, boolean tryNoCleaner) Create a new instance
| |
| compositeDirectBuffer | back to summary |
|---|---|
| public CompositeByteBuf compositeDirectBuffer(int maxNumComponents) Overrides io. Implements io. Doc from io. Allocate a direct
| |
| compositeHeapBuffer | back to summary |
|---|---|
| public CompositeByteBuf compositeHeapBuffer(int maxNumComponents) Overrides io. Implements io. Doc from io. Allocate a heap
| |
| decrementDirect | back to summary |
|---|---|
| pack-priv void decrementDirect(int amount) | |
| decrementHeap | back to summary |
|---|---|
| pack-priv void decrementHeap(int amount) | |
| incrementDirect | back to summary |
|---|---|
| pack-priv void incrementDirect(int amount) | |
| incrementHeap | back to summary |
|---|---|
| pack-priv void incrementHeap(int amount) | |
| isDirectBufferPooled | back to summary |
|---|---|
| public boolean isDirectBufferPooled() Implements io. Doc from io. Returns
| |
| metric | back to summary |
|---|---|
| public ByteBufAllocatorMetric metric() Implements io. Doc from io. Returns a
| |
| newDirectBuffer | back to summary |
|---|---|
| protected ByteBuf newDirectBuffer(int initialCapacity, int maxCapacity) Implements abstract io. Doc from io. Create a direct
| |
| newHeapBuffer | back to summary |
|---|---|
| protected ByteBuf newHeapBuffer(int initialCapacity, int maxCapacity) Implements abstract io. Doc from io. Create a heap
| |
| Access | Constructor and Description |
|---|---|
| pack-priv | InstrumentedUnpooledDirectByteBuf(UnpooledByteBufAllocator alloc, int initialCapacity, int maxCapacity)
|
| Modifier and Type | Method and Description |
|---|---|
| protected ByteBuffer | allocateDirect(int initialCapacity)
Overrides io. ByteBuffer with the given initialCapacity.
|
| protected void | freeDirect(ByteBuffer buffer)
Overrides io. ByteBuffer
|
| InstrumentedUnpooledDirectByteBuf | back to summary |
|---|---|
| pack-priv InstrumentedUnpooledDirectByteBuf(UnpooledByteBufAllocator alloc, int initialCapacity, int maxCapacity) | |
| allocateDirect | back to summary |
|---|---|
| protected ByteBuffer allocateDirect(int initialCapacity) Overrides io. Doc from io. Allocate a new direct
| |
| freeDirect | back to summary |
|---|---|
| protected void freeDirect(ByteBuffer buffer) Overrides io. Doc from io. Free a direct
| |
| Access | Constructor and Description |
|---|---|
| pack-priv | InstrumentedUnpooledHeapByteBuf(UnpooledByteBufAllocator alloc, int initialCapacity, int maxCapacity)
|
| Modifier and Type | Method and Description |
|---|---|
| protected byte[] | |
| protected void |
| InstrumentedUnpooledHeapByteBuf | back to summary |
|---|---|
| pack-priv InstrumentedUnpooledHeapByteBuf(UnpooledByteBufAllocator alloc, int initialCapacity, int maxCapacity) | |
| allocateArray | back to summary |
|---|---|
| protected byte[] allocateArray(int initialCapacity) Overrides io.
| |
| freeArray | back to summary |
|---|---|
| protected void freeArray(byte[] array) Overrides io.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv | InstrumentedUnpooledUnsafeDirectByteBuf(UnpooledByteBufAllocator alloc, int initialCapacity, int maxCapacity)
|
| Modifier and Type | Method and Description |
|---|---|
| protected ByteBuffer | allocateDirect(int initialCapacity)
Overrides io. ByteBuffer with the given initialCapacity.
|
| protected void | freeDirect(ByteBuffer buffer)
Overrides io. ByteBuffer
|
| InstrumentedUnpooledUnsafeDirectByteBuf | back to summary |
|---|---|
| pack-priv InstrumentedUnpooledUnsafeDirectByteBuf(UnpooledByteBufAllocator alloc, int initialCapacity, int maxCapacity) | |
| allocateDirect | back to summary |
|---|---|
| protected ByteBuffer allocateDirect(int initialCapacity) Overrides io. Doc from io. Allocate a new direct
| |
| freeDirect | back to summary |
|---|---|
| protected void freeDirect(ByteBuffer buffer) Overrides io. Doc from io. Free a direct
| |
| Access | Constructor and Description |
|---|---|
| pack-priv | InstrumentedUnpooledUnsafeHeapByteBuf(UnpooledByteBufAllocator alloc, int initialCapacity, int maxCapacity)
|
| Modifier and Type | Method and Description |
|---|---|
| protected byte[] | allocateArray(int initialCapacity)
Overrides io. |
| protected void |
| InstrumentedUnpooledUnsafeHeapByteBuf | back to summary |
|---|---|
| pack-priv InstrumentedUnpooledUnsafeHeapByteBuf(UnpooledByteBufAllocator alloc, int initialCapacity, int maxCapacity) | |
| allocateArray | back to summary |
|---|---|
| protected byte[] allocateArray(int initialCapacity) Overrides io.
| |
| freeArray | back to summary |
|---|---|
| protected void freeArray(byte[] array) Overrides io.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv | InstrumentedUnpooledUnsafeNoCleanerDirectByteBuf(UnpooledByteBufAllocator alloc, int initialCapacity, int maxCapacity)
|
| Modifier and Type | Method and Description |
|---|---|
| protected ByteBuffer | allocateDirect(int initialCapacity)
Overrides io. ByteBuffer with the given initialCapacity.
|
| protected void | freeDirect(ByteBuffer buffer)
Overrides io. ByteBuffer
|
| pack-priv ByteBuffer | reallocateDirect(ByteBuffer oldBuffer, int initialCapacity)
Overrides io. |
| InstrumentedUnpooledUnsafeNoCleanerDirectByteBuf | back to summary |
|---|---|
| pack-priv InstrumentedUnpooledUnsafeNoCleanerDirectByteBuf(UnpooledByteBufAllocator alloc, int initialCapacity, int maxCapacity) | |
| allocateDirect | back to summary |
|---|---|
| protected ByteBuffer allocateDirect(int initialCapacity) Overrides io. Doc from io. Allocate a new direct
| |
| freeDirect | back to summary |
|---|---|
| protected void freeDirect(ByteBuffer buffer) Overrides io. Doc from io. Free a direct
| |
| reallocateDirect | back to summary |
|---|---|
| pack-priv ByteBuffer reallocateDirect(ByteBuffer oldBuffer, int initialCapacity) Overrides io.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final LongCounter | |
| pack-priv final LongCounter |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public long | usedDirectMemory()
Implements io. ByteBufAllocator or -1 if unknown.
|
| public long | usedHeapMemory()
Implements io. ByteBufAllocator or -1 if unknown.
|
| directCounter | back to summary |
|---|---|
| pack-priv final LongCounter directCounter | |
| heapCounter | back to summary |
|---|---|
| pack-priv final LongCounter heapCounter | |
| UnpooledByteBufAllocatorMetric | back to summary |
|---|---|
| private UnpooledByteBufAllocatorMetric() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| usedDirectMemory | back to summary |
|---|---|
| public long usedDirectMemory() Implements io. Doc from io. Returns the number of bytes of direct memory used by a
| |
| usedHeapMemory | back to summary |
|---|---|
| public long usedHeapMemory() Implements io. Doc from io. Returns the number of bytes of heap memory used by a
| |