|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.kafka.common.network.ByteBufferReceive
public class ByteBufferReceive
A receive backed by an array of ByteBuffers
Constructor Summary | |
---|---|
ByteBufferReceive(int source,
java.nio.ByteBuffer... buffers)
|
Method Summary | |
---|---|
boolean |
complete()
Are we done receiving data? |
long |
readFrom(java.nio.channels.ScatteringByteChannel channel)
Read bytes into this receive from the given channel |
java.nio.ByteBuffer[] |
reify()
Turn this receive into ByteBuffer instances, if possible (otherwise returns null). |
int |
source()
The numeric id of the source from which we are receiving data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ByteBufferReceive(int source, java.nio.ByteBuffer... buffers)
Method Detail |
---|
public int source()
Receive
source
in interface Receive
public boolean complete()
Receive
complete
in interface Receive
public long readFrom(java.nio.channels.ScatteringByteChannel channel) throws java.io.IOException
Receive
readFrom
in interface Receive
channel
- The channel to read from
java.io.IOException
- If the reading failspublic java.nio.ByteBuffer[] reify()
Receive
reify
in interface Receive
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |