Package org.jctools.channels.mpsc
Class MpscChannel<E>
- java.lang.Object
-
- org.jctools.channels.mpsc.MpscChannel<E>
-
-
Constructor Summary
Constructors Constructor Description MpscChannel(ByteBuffer buffer, int requestedCapacity, Class<E> type)
This is to be used for an IPC queue with the direct buffer used being a memory mapped file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChannelConsumer
consumer(ChannelReceiver<E> receiver)
boolean
isEmpty()
int
maximumCapacity()
ChannelProducer<E>
producer()
int
requestedCapacity()
int
size()
Get the number of elements in the queue.
-
-
-
Constructor Detail
-
MpscChannel
public MpscChannel(ByteBuffer buffer, int requestedCapacity, Class<E> type)
This is to be used for an IPC queue with the direct buffer used being a memory mapped file.- Parameters:
buffer
-requestedCapacity
-
-
-
Method Detail
-
consumer
public ChannelConsumer consumer(ChannelReceiver<E> receiver)
-
producer
public ChannelProducer<E> producer()
-
size
public int size()
Description copied from interface:Channel
Get the number of elements in the queue.
-
maximumCapacity
public int maximumCapacity()
- Specified by:
maximumCapacity
in interfaceChannel<E>
- Returns:
- the maximum number of elements that can fit in this channel.
-
requestedCapacity
public int requestedCapacity()
- Specified by:
requestedCapacity
in interfaceChannel<E>
- Returns:
- The requested maximum number of elements that can fit in this channel.
-
-