| 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 SpscChannelProducer<E> |
producer |
private int |
requestedCapacity |
| Constructor and Description |
|---|
SpscChannel(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 SpscChannelConsumer<E> |
newConsumer(java.lang.Object... args) |
private SpscChannelProducer<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 SpscChannelProducer<E> producer
public SpscChannel(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()
Channelpublic int maximumCapacity()
maximumCapacity in interface Channel<E>public int requestedCapacity()
requestedCapacity in interface Channel<E>private SpscChannelProducer<E> newProducer(java.lang.Class<E> type, java.lang.Object... args)
private SpscChannelConsumer<E> newConsumer(java.lang.Object... args)