Class QueuePrimitiveChannel<Message>
- java.lang.Object
-
- co.paralleluniverse.strands.channels.QueueChannel<Message>
-
- co.paralleluniverse.strands.channels.QueuePrimitiveChannel<Message>
-
- All Implemented Interfaces:
Channel<Message>
,Port<Message>
,PortAutoCloseable
,ReceivePort<Message>
,Selectable<Message>
,SendPort<Message>
,StandardChannel<Message>
,Stranded
,Synchronization
,java.io.Serializable
,java.lang.AutoCloseable
- Direct Known Subclasses:
QueueDoubleChannel
,QueueFloatChannel
,QueueIntChannel
,QueueLongChannel
public class QueuePrimitiveChannel<Message> extends QueueChannel<Message> implements Stranded
Single consumer!- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface co.paralleluniverse.strands.channels.ReceivePort
ReceivePort.EOFException
-
-
Field Summary
-
Fields inherited from class co.paralleluniverse.strands.channels.QueueChannel
RECORDER
-
-
Constructor Summary
Constructors Constructor Description QueuePrimitiveChannel(co.paralleluniverse.strands.queues.BasicSingleConsumerQueue<Message> queue, Channels.OverflowPolicy policy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkClosed()
Strand
getStrand()
boolean
hasMessage()
protected void
maybeSetCurrentStrandAsOwner()
protected co.paralleluniverse.strands.queues.BasicSingleConsumerQueue<Message>
queue()
void
setStrand(Strand strand)
-
Methods inherited from class co.paralleluniverse.strands.channels.QueueChannel
capacity, close, close, equals, getCloseException, getOverflowPolicy, getQueueLength, isClosed, isSingleConsumer, isSingleProducer, receive, receive, receive, receiveFromThread, receiveFromThread, register, register, send, send, send, send0, sendNonSuspendable, sendSync, signalAndWait, signalReceivers, sync, toString, tryNow, tryReceive, trySend, unregister, writeReplace
-
-
-
-
Constructor Detail
-
QueuePrimitiveChannel
public QueuePrimitiveChannel(co.paralleluniverse.strands.queues.BasicSingleConsumerQueue<Message> queue, Channels.OverflowPolicy policy)
-
-
Method Detail
-
maybeSetCurrentStrandAsOwner
protected void maybeSetCurrentStrandAsOwner()
-
checkClosed
protected void checkClosed() throws ReceivePort.EOFException
- Throws:
ReceivePort.EOFException
-
hasMessage
public boolean hasMessage()
-
queue
protected co.paralleluniverse.strands.queues.BasicSingleConsumerQueue<Message> queue()
-
-