@Deprecated
public static interface RecvByteBufAllocator.Handle | Modifier and Type | Method and Description |
|---|---|
ByteBuf |
allocate(ByteBufAllocator alloc)
已过时。
创建一个新的接收缓冲区,其容量可能足够大,可以读取所有入站数据,并且足够小,不会浪费其空间。
|
int |
attemptedBytesRead()
已过时。
获取读取操作将要(或确实)尝试读取的字节数。
|
void |
attemptedBytesRead(int bytes)
已过时。
设置读取操作将要(或确实)尝试读取的字节数。
|
boolean |
continueReading()
已过时。
确定当前的读取循环是否应该继续。
|
int |
guess()
已过时。
类似于
allocate(ByteBufAllocator),除了它不分配任何东西,只是告诉容量。
|
void |
incMessagesRead(int numMessages)
已过时。
增加为当前读取循环读取的消息数量。
|
int |
lastBytesRead()
已过时。
获取上一次读取操作的字节数量。
|
void |
lastBytesRead(int bytes)
已过时。
设置上次读取操作所读取的字节。
|
void |
readComplete()
已过时。
阅读已完成。
|
void |
reset(ChannelConfig config)
已过时。
重置累计的任何计数器,并推荐下一个读取循环应读取多少个消息/字节。
|
ByteBuf allocate(ByteBufAllocator alloc)
int guess()
allocate(ByteBufAllocator),除了它不分配任何东西,只是告诉容量。
void reset(ChannelConfig config)
config - 可能影响此对象行为的通道配置。
void incMessagesRead(int numMessages)
numMessages - 增加的金额。
void lastBytesRead(int bytes)
bytes - 来自先前读取操作的字节数。
如果发生读取错误,这可能是负面的。
如果看到负值,则预计将在下次呼叫lastBytesRead()时返回 。
负值表示在该课程外部强制执行的终止条件,不需要在continueReading()中强制执行。
int lastBytesRead()
void attemptedBytesRead(int bytes)
bytes - 读取操作将会(或确实)尝试读取多少个字节。
int attemptedBytesRead()
boolean continueReading()
true如果读取循环应继续读取。
false如果读取循环完成。
void readComplete()
Copyright © 2008–2018 The Netty Project. All rights reserved.