The buffers are written out directly into direct memory to match the struct iov. See also man writev.
struct iovec {
void *iov_base;
size_t iov_len;
};
See also
Efficient JNI programming IV: Wrapping native data objects.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | ADDRESS_SIZE
The size of an address which should be 8 for 64 bits and 4 for 32 bits. |
| private int | |
| public static final int | IOV_SIZE
The size of an |
| private static final int | MAX_CAPACITY
The needed memory to hold up to |
| private long | |
| private final ByteBuffer | |
| private final long | |
| private long |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | |
| public int | |
| private static int | |
| public void | maxBytes(long
the maximum amount of bytes that can be added to this maxBytes)IovArray.Set the maximum amount of bytes that can be added to this |
| public long | |
| public long | |
| public void | |
| public long | |
| public boolean | test(Object
the input argument msg)Implements java. |
| public int | Returns: the number of messages that are totally written for the given number of total bytes.the start index. index, long the total number of bytes totalBytes)Return the number of messages that have been completely written for the given total number of bytes. |
| ADDRESS_SIZE | back to summary |
|---|---|
| private static final int ADDRESS_SIZE The size of an address which should be 8 for 64 bits and 4 for 32 bits. | |
| count | back to summary |
|---|---|
| private int count | |
| IOV_SIZE | back to summary |
|---|---|
| public static final int IOV_SIZE The size of an | |
| MAX_CAPACITY | back to summary |
|---|---|
| private static final int MAX_CAPACITY The needed memory to hold up to | |
| maxBytes | back to summary |
|---|---|
| private long maxBytes | |
| memory | back to summary |
|---|---|
| private final ByteBuffer memory | |
| memoryAddress | back to summary |
|---|---|
| private final long memoryAddress | |
| size | back to summary |
|---|---|
| private long size | |
| IovArray | back to summary |
|---|---|
| public IovArray() | |
| IovArray | back to summary |
|---|---|
| public IovArray(ByteBuffer memory) | |
| add | back to summary |
|---|---|
| private boolean add(long memoryAddress, long addr, int len) | |
| addReadable | back to summary |
|---|---|
| public boolean addReadable(Buffer buffer) | |
| addReadable | back to summary |
|---|---|
| public boolean addReadable(BufferComponent component, int byteCount) | |
| addWritable | back to summary |
|---|---|
| public boolean addWritable(Buffer buffer) | |
| addWritable | back to summary |
|---|---|
| public boolean addWritable(BufferComponent component, int byteCount) | |
| clear | back to summary |
|---|---|
| public void clear() | |
| count | back to summary |
|---|---|
| public int count() Returns the number if iov entries. | |
| idx | back to summary |
|---|---|
| private static int idx(int index) | |
| maxBytes | back to summary |
|---|---|
| public void maxBytes(long maxBytes) Set the maximum amount of bytes that can be added to this
This will not impact the existing state of the
In order to ensure some progress is made at least one
| |
| maxBytes | back to summary |
|---|---|
| public long maxBytes() Get the maximum amount of bytes that can be added to this
| |
| memoryAddress | back to summary |
|---|---|
| public long memoryAddress(int index) Returns the | |
| release | back to summary |
|---|---|
| public void release() Release the | |
| size | back to summary |
|---|---|
| public long size() Returns the size in bytes | |
| test | back to summary |
|---|---|
| public boolean test(Object msg) Implements java. Doc from java. Evaluates this predicate on the given argument. | |
| writtenMessages | back to summary |
|---|---|
| public int writtenMessages(int index, long totalBytes) Return the number of messages that have been completely written for the given total number of bytes.
| |