public final class ChannelOutboundBuffer extends Object
AbstractChannel
to store its pending
outbound write requests.Modifier and Type | Method and Description |
---|---|
Object |
current() |
Object |
current(boolean preferDirect) |
void |
current(Object msg)
Replace the current msg with the given one.
|
boolean |
isEmpty() |
int |
nioBufferCount() |
ByteBuffer[] |
nioBuffers()
Returns an array of direct NIO buffers if the currently pending messages are made of
ByteBuf only. |
long |
nioBufferSize() |
void |
progress(long amount) |
void |
recycle() |
boolean |
remove() |
boolean |
remove(Throwable cause) |
int |
size() |
long |
totalPendingWriteBytes() |
public Object current()
public Object current(boolean preferDirect)
public void current(Object msg)
public void progress(long amount)
public boolean remove()
public boolean remove(Throwable cause)
public ByteBuffer[] nioBuffers()
ByteBuf
only.
null
is returned otherwise. If this method returns a non-null array, nioBufferCount()
and
nioBufferSize()
will return the number of NIO buffers in the returned array and the total number
of readable bytes of the NIO buffers respectively.
Note that the returned array is reused and thus should not escape
AbstractChannel.doWrite(ChannelOutboundBuffer)
.
Refer to NioSocketChannel.doWrite(ChannelOutboundBuffer)
for an example.
public int nioBufferCount()
public long nioBufferSize()
public int size()
public boolean isEmpty()
public void recycle()
public long totalPendingWriteBytes()
Copyright © 2008–2018 The Netty Project. All rights reserved.