public abstract class AbstractByteBufAllocator extends java.lang.Object implements ByteBufAllocator
ByteBufAllocator实施延伸。
DEFAULT| Modifier | Constructor and Description |
|---|---|
protected |
AbstractByteBufAllocator()
实例默认使用堆缓冲区
|
protected |
AbstractByteBufAllocator(boolean preferDirect)
创建新的实例
|
| 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的直接缓冲区。
|
protected abstract ByteBuf |
newDirectBuffer(int initialCapacity, int maxCapacity)
创建直接 ByteBuf给定参数:initialCapacity和MAXCAPACITY。
|
protected abstract ByteBuf |
newHeapBuffer(int initialCapacity, int maxCapacity)
创建一个堆 ByteBuf给定参数:initialCapacity和MAXCAPACITY。
|
protected static ByteBuf |
toLeakAwareBuffer(ByteBuf buf) |
protected static CompositeByteBuf |
toLeakAwareBuffer(CompositeByteBuf buf) |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisDirectBufferPooledprotected AbstractByteBufAllocator()
protected AbstractByteBufAllocator(boolean preferDirect)
preferDirect -
true如果
buffer(int)应该尝试分配直接缓冲区而不是堆缓冲区
protected static CompositeByteBuf toLeakAwareBuffer(CompositeByteBuf buf)
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
protected abstract ByteBuf newHeapBuffer(int initialCapacity, int maxCapacity)
ByteBuf给定参数:initialCapacity和MAXCAPACITY。
protected abstract ByteBuf newDirectBuffer(int initialCapacity, int maxCapacity)
ByteBuf给定参数:initialCapacity和MAXCAPACITY。
public java.lang.String toString()
toString在课堂
java.lang.Object
public int calculateNewCapacity(int minNewCapacity,
int maxCapacity)
ByteBufAllocator复制的描述
calculateNewCapacity在界面
ByteBufAllocator
Copyright © 2008–2018 The Netty Project. All rights reserved.