| java.lang.Object seda.sandStorm.core.BufferElement
All known Subclasses: seda.sandStorm.lib.aSocket.AUdpPacket,
BufferElement | public class BufferElement implements QueueElementIF(Code) | | A BufferElement is a QueueElementIF which represents a memory buffer.
author: Matt Welsh |
Field Summary | |
public SinkIF | compQ The completion queue associated with this buffer. | public byte | data The data associated with this BufferElement. | public int | offset The offet into the data associated with this BufferElement. | public int | size The size of the data associated with this BufferElement. | public Object | userTag A user-defined tag object associated with this buffer. |
Constructor Summary | |
public | BufferElement(byte data) Create a BufferElement with the given data, an offset of 0, and a
size of data.length. | public | BufferElement(byte data, SinkIF compQ) Create a BufferElement with the given data, an offset of 0, and a
size of data.length, with the given completion queue. | public | BufferElement(byte data, int offset, int size) Create a BufferElement with the given data, offset, and size. | public | BufferElement(byte data, int offset, int size, SinkIF compQ) Create a BufferElement with the given data, offset, size, and
completion queue. | public | BufferElement(int size) Create a BufferElement with a new data array of the given size. |
compQ | public SinkIF compQ(Code) | | The completion queue associated with this buffer.
|
data | public byte data(Code) | | The data associated with this BufferElement.
|
offset | public int offset(Code) | | The offet into the data associated with this BufferElement.
|
size | public int size(Code) | | The size of the data associated with this BufferElement. May not be
equal to data.length; may be any value less than or equal to
(data.length - offset).
|
userTag | public Object userTag(Code) | | A user-defined tag object associated with this buffer.
Can be used as a back-pointer from the buffer to application
state, e.g., for handling completions.
|
BufferElement | public BufferElement(byte data)(Code) | | Create a BufferElement with the given data, an offset of 0, and a
size of data.length.
|
BufferElement | public BufferElement(byte data, SinkIF compQ)(Code) | | Create a BufferElement with the given data, an offset of 0, and a
size of data.length, with the given completion queue.
|
BufferElement | public BufferElement(byte data, int offset, int size)(Code) | | Create a BufferElement with the given data, offset, and size.
|
BufferElement | public BufferElement(byte data, int offset, int size, SinkIF compQ)(Code) | | Create a BufferElement with the given data, offset, size, and
completion queue.
|
BufferElement | public BufferElement(int size)(Code) | | Create a BufferElement with a new data array of the given size.
|
getBytes | public byte[] getBytes()(Code) | | Return the data.
|
getCompletionQueue | public SinkIF getCompletionQueue()(Code) | | Return the completion queue for this buffer.
|
getOffset | public int getOffset()(Code) | | Return the offset.
|
getSize | public int getSize()(Code) | | Return the size.
|
|
|