Interface StandardChannel<Message>
-
- All Superinterfaces:
java.lang.AutoCloseable
,Channel<Message>
,Port<Message>
,PortAutoCloseable
,ReceivePort<Message>
,SendPort<Message>
- All Known Implementing Classes:
Mailbox
,QueueChannel
,QueueDoubleChannel
,QueueFloatChannel
,QueueIntChannel
,QueueLongChannel
,QueueObjectChannel
,QueuePrimitiveChannel
,SingleConsumerQueueChannel
,TimeoutChannel
,TransferChannel
public interface StandardChannel<Message> extends Channel<Message>
A common interface for standard channel implementations
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface co.paralleluniverse.strands.channels.ReceivePort
ReceivePort.EOFException
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
capacity()
The channel's internal buffer capacity.boolean
isSingleConsumer()
Whether or not the channel supports a single consumer only.boolean
isSingleProducer()
Whether or not the channel supports a single producer only.-
Methods inherited from interface co.paralleluniverse.strands.channels.PortAutoCloseable
close, isClosed
-
Methods inherited from interface co.paralleluniverse.strands.channels.ReceivePort
receive, receive, receive, tryReceive
-
-
-
-
Method Detail
-
capacity
int capacity()
The channel's internal buffer capacity.- Returns:
- the channel's internal buffer capacity,
-1
for an unbounded buffer, and0
for a transfer channel.
-
isSingleProducer
boolean isSingleProducer()
Whether or not the channel supports a single producer only.- Returns:
true
if the channel supports no more than one producer;false
otherwise.
-
isSingleConsumer
boolean isSingleConsumer()
Whether or not the channel supports a single consumer only.- Returns:
true
if the channel supports no more than one consumer;false
otherwise.
-
-