|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.kafka.common.network.NetworkReceive
public class NetworkReceive
A size delimited Receive that consists of a 4 byte network-ordered size N followed by N bytes of content
Constructor Summary | |
---|---|
NetworkReceive(int source)
|
|
NetworkReceive(int source,
java.nio.ByteBuffer buffer)
|
Method Summary | |
---|---|
boolean |
complete()
Are we done receiving data? |
java.nio.ByteBuffer |
payload()
|
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 NetworkReceive(int source, java.nio.ByteBuffer buffer)
public NetworkReceive(int source)
Method Detail |
---|
public int source()
Receive
source
in interface Receive
public boolean complete()
Receive
complete
in interface Receive
public java.nio.ByteBuffer[] reify()
Receive
reify
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 payload()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |