Modifier and Type | Field and Description |
---|---|
private java.nio.ByteBuffer |
buffer |
private static boolean |
debugEnabled |
private int |
elementSize |
private Mapper<E> |
mapper |
private int |
maximumCapacity |
private MpscChannelProducer<E> |
producer |
private int |
requestedCapacity |
Constructor and Description |
---|
MpscChannel(java.nio.ByteBuffer buffer,
int requestedCapacity,
java.lang.Class<E> type)
This is to be used for an IPC queue with the direct buffer used being a memory mapped file.
|
Modifier and Type | Method and Description |
---|---|
private void |
checkByteBuffer() |
private void |
checkSufficientCapacity() |
ChannelConsumer |
consumer(ChannelReceiver<E> receiver) |
private int |
getMaximumCapacity(int requestedCapacity) |
boolean |
isEmpty() |
int |
maximumCapacity() |
private MpscChannelConsumer<E> |
newConsumer(java.lang.Object... args) |
private MpscChannelProducer<E> |
newProducer(java.lang.Class<E> type,
java.lang.Object... args) |
ChannelProducer<E> |
producer() |
int |
requestedCapacity() |
int |
size()
Get the number of elements in the queue.
|
private static final boolean debugEnabled
private final int elementSize
private final java.nio.ByteBuffer buffer
private final int maximumCapacity
private final int requestedCapacity
private final MpscChannelProducer<E> producer
public MpscChannel(java.nio.ByteBuffer buffer, int requestedCapacity, java.lang.Class<E> type)
buffer
- requestedCapacity
- private int getMaximumCapacity(int requestedCapacity)
private void checkByteBuffer()
private void checkSufficientCapacity()
public ChannelConsumer consumer(ChannelReceiver<E> receiver)
public ChannelProducer<E> producer()
public int size()
Channel
public int maximumCapacity()
maximumCapacity
in interface Channel<E>
public int requestedCapacity()
requestedCapacity
in interface Channel<E>
private MpscChannelProducer<E> newProducer(java.lang.Class<E> type, java.lang.Object... args)
private MpscChannelConsumer<E> newConsumer(java.lang.Object... args)