@UnstableApi public final class PreferHeapByteBufAllocator extends java.lang.Object implements ByteBufAllocator
ByteBufAllocator,并且在明确请求直接缓冲区时除外使用堆缓冲区。
DEFAULT| Constructor and Description |
|---|
PreferHeapByteBufAllocator(ByteBufAllocator allocator) |
| Modifier and Type | Method and Description |
|---|---|
ByteBuf |
buffer()
分配一个 ByteBuf 。
|
ByteBuf |
buffer(int initialCapacity)
用给定的初始容量分配 ByteBuf 。
|
ByteBuf |
buffer(int initialCapacity, int maxCapacity)
分配 ByteBuf与给定的初始容量和给定的最大容量。
|
int |
calculateNewCapacity(int minNewCapacity, int maxCapacity)
|
CompositeByteBuf |
compositeBuffer()
分配一个 CompositeByteBuf 。
|
CompositeByteBuf |
compositeBuffer(int maxNumComponents)
用 CompositeByteBuf分配给定的最大数量的可存储在其中的组件。
|
CompositeByteBuf |
compositeDirectBuffer()
分配直接 CompositeByteBuf 。
|
CompositeByteBuf |
compositeDirectBuffer(int maxNumComponents)
分配一个直接 CompositeByteBuf与给定的最大数量的组件可以存储在它。
|
CompositeByteBuf |
compositeHeapBuffer()
分配一个堆 CompositeByteBuf 。
|
CompositeByteBuf |
compositeHeapBuffer(int maxNumComponents)
分配一个堆 CompositeByteBuf ,其中可存储最多数量的组件。
|
ByteBuf |
directBuffer()
分配直接 ByteBuf 。
|
ByteBuf |
directBuffer(int initialCapacity)
分配给定的初始容量的直接 ByteBuf 。
|
ByteBuf |
directBuffer(int initialCapacity, int maxCapacity)
分配给定的初始容量和给定的最大容量的直接 ByteBuf 。
|
ByteBuf |
heapBuffer()
分配一个堆 ByteBuf 。
|
ByteBuf |
heapBuffer(int initialCapacity)
用给定的初始容量分配堆 ByteBuf 。
|
ByteBuf |
heapBuffer(int initialCapacity, int maxCapacity)
分配给定的初始容量和给定的最大容量的堆 ByteBuf 。
|
ByteBuf |
ioBuffer()
分配一个 ByteBuf ,最好是一个适用于I / O的直接缓冲区。
|
ByteBuf |
ioBuffer(int initialCapacity)
分配一个 ByteBuf ,最好是一个适用于I / O的直接缓冲区。
|
ByteBuf |
ioBuffer(int initialCapacity, int maxCapacity)
分配一个 ByteBuf ,最好是一个适合I / O的直接缓冲区。
|
boolean |
isDirectBufferPooled()
如果直接拨打 true则返回true
|
public PreferHeapByteBufAllocator(ByteBufAllocator allocator)
public ByteBuf buffer()
ByteBufAllocator复制的描述
ByteBuf 。
如果是直接或堆缓冲取决于实际的实现。
buffer在界面
ByteBufAllocator
public ByteBuf buffer(int initialCapacity)
ByteBufAllocator复制的描述
ByteBuf 。
如果是直接或堆缓冲取决于实际的实现。
buffer在界面
ByteBufAllocator
public ByteBuf buffer(int initialCapacity, int maxCapacity)
ByteBufAllocator复制的描述
ByteBuf与给定的初始容量和给定的最大容量。
如果是直接或堆缓冲取决于实际的实现。
buffer在界面
ByteBufAllocator
public ByteBuf ioBuffer()
ByteBufAllocator复制的描述
ByteBuf ,最好是一个适合I / O的直接缓冲区。
ioBuffer ,界面
ByteBufAllocator
public ByteBuf ioBuffer(int initialCapacity)
ByteBufAllocator复制的描述
ByteBuf ,最好是一个适合I / O的直接缓冲区。
ioBuffer在界面
ByteBufAllocator
public ByteBuf ioBuffer(int initialCapacity, int maxCapacity)
ByteBufAllocator复制的描述
ByteBuf ,最好是一个适合I / O的直接缓冲区。
ioBuffer在界面
ByteBufAllocator
public ByteBuf heapBuffer()
ByteBufAllocator
ByteBuf 。
heapBuffer在界面
ByteBufAllocator
public ByteBuf heapBuffer(int initialCapacity)
ByteBufAllocator
ByteBuf 。
heapBuffer在界面
ByteBufAllocator
public ByteBuf heapBuffer(int initialCapacity, int maxCapacity)
ByteBufAllocator复制的描述
ByteBuf与给定的初始容量和给定的最大容量。
heapBuffer在界面
ByteBufAllocator
public ByteBuf directBuffer()
ByteBufAllocator复制的描述
ByteBuf 。
directBuffer在界面
ByteBufAllocator
public ByteBuf directBuffer(int initialCapacity)
ByteBufAllocator复制的描述
ByteBuf 。
directBuffer在界面
ByteBufAllocator
public ByteBuf directBuffer(int initialCapacity, int maxCapacity)
ByteBufAllocator复制的描述
ByteBuf 。
directBuffer ,界面
ByteBufAllocator
public CompositeByteBuf compositeBuffer()
ByteBufAllocator复制的描述
CompositeByteBuf 。
如果是直接或堆缓冲取决于实际的实现。
compositeBuffer在界面
ByteBufAllocator
public CompositeByteBuf compositeBuffer(int maxNumComponents)
ByteBufAllocator复制的描述
CompositeByteBuf ,其中可以存储最多数量的组件。
如果是直接或堆缓冲取决于实际的实现。
compositeBuffer在界面
ByteBufAllocator
public CompositeByteBuf compositeHeapBuffer()
ByteBufAllocator复制的描述
CompositeByteBuf 。
compositeHeapBuffer在界面
ByteBufAllocator
public CompositeByteBuf compositeHeapBuffer(int maxNumComponents)
ByteBufAllocator
CompositeByteBuf与给定的最大数量的组件可以存储在它。
compositeHeapBuffer在界面
ByteBufAllocator
public CompositeByteBuf compositeDirectBuffer()
ByteBufAllocator
CompositeByteBuf 。
compositeDirectBuffer在界面
ByteBufAllocator
public CompositeByteBuf compositeDirectBuffer(int maxNumComponents)
ByteBufAllocator复制的描述
CompositeByteBuf ,其中可以存储最多数量的组件。
compositeDirectBuffer接口
ByteBufAllocator
public boolean isDirectBufferPooled()
ByteBufAllocator复制的描述
true则返回true
isDirectBufferPooled在界面
ByteBufAllocator
public int calculateNewCapacity(int minNewCapacity,
int maxCapacity)
ByteBufAllocator复制的描述
calculateNewCapacity在界面
ByteBufAllocator
Copyright © 2008–2018 The Netty Project. All rights reserved.