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 ChannelConsumerconsumer(ChannelReceiver<E> receiver)booleanisEmpty()intmaximumCapacity()ChannelProducer<E>producer()intrequestedCapacity()intsize()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:ChannelGet the number of elements in the queue.
-
maximumCapacity
public int maximumCapacity()
- Specified by:
maximumCapacityin interfaceChannel<E>- Returns:
- the maximum number of elements that can fit in this channel.
-
requestedCapacity
public int requestedCapacity()
- Specified by:
requestedCapacityin interfaceChannel<E>- Returns:
- The requested maximum number of elements that can fit in this channel.
-
-