public class BytesRingBuffer extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
BytesRingBuffer.BytesProvider |
| Constructor and Description |
|---|
BytesRingBuffer(net.openhft.chronicle.bytes.Bytes buffer) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
offer(net.openhft.chronicle.bytes.Bytes bytes0)
Inserts the specified element at the tail of this queue if it is possible to do so
immediately without exceeding the queue's capacity,
|
net.openhft.chronicle.bytes.Bytes |
poll(BytesRingBuffer.BytesProvider bytesProvider)
Retrieves and removes the head of this queue, or returns
null if this queue is
empty. |
net.openhft.chronicle.bytes.Bytes |
take(BytesRingBuffer.BytesProvider bytesProvider) |
public BytesRingBuffer(@NotNull
net.openhft.chronicle.bytes.Bytes buffer)
buffer - the bytes that you wish to use for the ring bufferpublic boolean offer(@NotNull
net.openhft.chronicle.bytes.Bytes bytes0)
throws InterruptedException
bytes0 - the bytes0 that you wish to add to the ring buffertrue upon success and false if this queue is full.InterruptedException@NotNull
public net.openhft.chronicle.bytes.Bytes take(@NotNull
BytesRingBuffer.BytesProvider bytesProvider)
throws InterruptedException,
IllegalStateException
@Nullable
public net.openhft.chronicle.bytes.Bytes poll(@NotNull
BytesRingBuffer.BytesProvider bytesProvider)
throws InterruptedException,
IllegalStateException
null if this queue is
empty.null if this queue is empty, or a populated buffer if the element was retriedIllegalStateException - is the using buffer is not large enoughInterruptedExceptionCopyright © 2015. All rights reserved.