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 intcapacity()The channel's internal buffer capacity.booleanisSingleConsumer()Whether or not the channel supports a single consumer only.booleanisSingleProducer()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,
-1for an unbounded buffer, and0for a transfer channel.
-
isSingleProducer
boolean isSingleProducer()
Whether or not the channel supports a single producer only.- Returns:
trueif the channel supports no more than one producer;falseotherwise.
-
isSingleConsumer
boolean isSingleConsumer()
Whether or not the channel supports a single consumer only.- Returns:
trueif the channel supports no more than one consumer;falseotherwise.
-
-