ByteBufAllocator implementation to extend.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| private final boolean | |
| private final ByteBuf |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | AbstractByteBufAllocator(boolean
true if buffer(int) should try to allocate a direct buffer rather than
a heap bufferCreate new instance |
| Modifier and Type | Method and Description |
|---|---|
| public ByteBuf | |
| public ByteBuf | buffer(int initialCapacity)
Implements io. ByteBuf with the given initial capacity.
|
| public ByteBuf | buffer(int initialCapacity, int maxCapacity)
Implements io. ByteBuf with the given initial capacity and the given
maximal capacity.
|
| public int | calculateNewCapacity(int minNewCapacity, int maxCapacity)
Implements io. ByteBuf that is used when a ByteBuf needs to expand by the
minNewCapacity with maxCapacity as upper-bound.
|
| public CompositeByteBuf | compositeBuffer()
Implements io. CompositeByteBuf.
|
| public CompositeByteBuf | compositeBuffer(int maxNumComponents)
Implements io. CompositeByteBuf with the given maximum number of components that can be stored in it.
|
| public CompositeByteBuf | compositeDirectBuffer()
Implements io. CompositeByteBuf.
|
| public CompositeByteBuf | compositeDirectBuffer(int maxNumComponents)
Implements io. CompositeByteBuf with the given maximum number of components that can be stored in it.
|
| public CompositeByteBuf | compositeHeapBuffer()
Implements io. CompositeByteBuf.
|
| public CompositeByteBuf | compositeHeapBuffer(int maxNumComponents)
Implements io. CompositeByteBuf with the given maximum number of components that can be stored in it.
|
| public ByteBuf | |
| public ByteBuf | directBuffer(int initialCapacity)
Implements io. ByteBuf with the given initial capacity.
|
| public ByteBuf | directBuffer(int initialCapacity, int maxCapacity)
Implements io. ByteBuf with the given initial capacity and the given
maximal capacity.
|
| public ByteBuf | |
| public ByteBuf | heapBuffer(int initialCapacity)
Implements io. ByteBuf with the given initial capacity.
|
| public ByteBuf | heapBuffer(int initialCapacity, int maxCapacity)
Implements io. ByteBuf with the given initial capacity and the given
maximal capacity.
|
| public ByteBuf | ioBuffer()
Implements io. ByteBuf, preferably a direct buffer which is suitable for I/O.
|
| public ByteBuf | ioBuffer(int initialCapacity)
Implements io. ByteBuf, preferably a direct buffer which is suitable for I/O.
|
| public ByteBuf | ioBuffer(int initialCapacity, int maxCapacity)
Implements io. ByteBuf, preferably a direct buffer which is suitable for I/O.
|
| protected abstract ByteBuf | newDirectBuffer(int initialCapacity, int maxCapacity)
Create a direct |
| protected abstract ByteBuf | newHeapBuffer(int initialCapacity, int maxCapacity)
Create a heap |
| protected static ByteBuf | |
| protected static CompositeByteBuf | |
| public String | |
| private static void |
| CALCULATE_THRESHOLD | back to summary |
|---|---|
| pack-priv static final int CALCULATE_THRESHOLD | |
| DEFAULT_INITIAL_CAPACITY | back to summary |
|---|---|
| pack-priv static final int DEFAULT_INITIAL_CAPACITY | |
| DEFAULT_MAX_CAPACITY | back to summary |
|---|---|
| pack-priv static final int DEFAULT_MAX_CAPACITY | |
| DEFAULT_MAX_COMPONENTS | back to summary |
|---|---|
| pack-priv static final int DEFAULT_MAX_COMPONENTS | |
| directByDefault | back to summary |
|---|---|
| private final boolean directByDefault | |
| emptyBuf | back to summary |
|---|---|
| private final ByteBuf emptyBuf | |
| AbstractByteBufAllocator | back to summary |
|---|---|
| protected AbstractByteBufAllocator() Instance use heap buffers by default | |
| AbstractByteBufAllocator | back to summary |
|---|---|
| protected AbstractByteBufAllocator(boolean preferDirect) Create new instance
| |
| buffer | back to summary |
|---|---|
| public ByteBuf buffer() Implements io. Doc from io. Allocate a
| |
| buffer | back to summary |
|---|---|
| public ByteBuf buffer(int initialCapacity) Implements io. Doc from io. Allocate a
| |
| buffer | back to summary |
|---|---|
| public ByteBuf buffer(int initialCapacity, int maxCapacity) Implements io. Doc from io. Allocate a
| |
| calculateNewCapacity | back to summary |
|---|---|
| public int calculateNewCapacity(int minNewCapacity, int maxCapacity) Implements io. Doc from io. Calculate the new capacity of a
| |
| compositeBuffer | back to summary |
|---|---|
| public CompositeByteBuf compositeBuffer() Implements io. Doc from io. Allocate a
| |
| compositeBuffer | back to summary |
|---|---|
| public CompositeByteBuf compositeBuffer(int maxNumComponents) Implements io. Doc from io. Allocate a
| |
| compositeDirectBuffer | back to summary |
|---|---|
| public CompositeByteBuf compositeDirectBuffer() Implements io. Doc from io. Allocate a direct
| |
| compositeDirectBuffer | back to summary |
|---|---|
| public CompositeByteBuf compositeDirectBuffer(int maxNumComponents) Implements io. Doc from io. Allocate a direct
| |
| compositeHeapBuffer | back to summary |
|---|---|
| public CompositeByteBuf compositeHeapBuffer() Implements io. Doc from io. Allocate a heap
| |
| compositeHeapBuffer | back to summary |
|---|---|
| public CompositeByteBuf compositeHeapBuffer(int maxNumComponents) Implements io. Doc from io. Allocate a heap
| |
| directBuffer | back to summary |
|---|---|
| public ByteBuf directBuffer() Implements io. Doc from io. Allocate a direct
| |
| directBuffer | back to summary |
|---|---|
| public ByteBuf directBuffer(int initialCapacity) Implements io. Doc from io. Allocate a direct
| |
| directBuffer | back to summary |
|---|---|
| public ByteBuf directBuffer(int initialCapacity, int maxCapacity) Implements io. Doc from io. Allocate a direct
| |
| heapBuffer | back to summary |
|---|---|
| public ByteBuf heapBuffer() Implements io. Doc from io. Allocate a heap
| |
| heapBuffer | back to summary |
|---|---|
| public ByteBuf heapBuffer(int initialCapacity) Implements io. Doc from io. Allocate a heap
| |
| heapBuffer | back to summary |
|---|---|
| public ByteBuf heapBuffer(int initialCapacity, int maxCapacity) Implements io. Doc from io. Allocate a heap
| |
| ioBuffer | back to summary |
|---|---|
| public ByteBuf ioBuffer() Implements io. Doc from io. Allocate a
| |
| ioBuffer | back to summary |
|---|---|
| public ByteBuf ioBuffer(int initialCapacity) Implements io. Doc from io. Allocate a
| |
| ioBuffer | back to summary |
|---|---|
| public ByteBuf ioBuffer(int initialCapacity, int maxCapacity) Implements io. Doc from io. Allocate a
| |
| newDirectBuffer | back to summary |
|---|---|
| protected abstract ByteBuf newDirectBuffer(int initialCapacity, int maxCapacity) Create a direct | |
| newHeapBuffer | back to summary |
|---|---|
| protected abstract ByteBuf newHeapBuffer(int initialCapacity, int maxCapacity) Create a heap | |
| toLeakAwareBuffer | back to summary |
|---|---|
| protected static ByteBuf toLeakAwareBuffer(ByteBuf buf) | |
| toLeakAwareBuffer | back to summary |
|---|---|
| protected static CompositeByteBuf toLeakAwareBuffer(CompositeByteBuf buf) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| validate | back to summary |
|---|---|
| private static void validate(int initialCapacity, int maxCapacity) | |