M
- the event/message typepublic interface MessagePassingQueue<M>
Queue
interface
sufficient for concurrent message passing.Modifier and Type | Method and Description |
---|---|
boolean |
isEmpty()
This method's accuracy is subject to concurrent modifications happening as the observation is carried out.
|
boolean |
offer(M message)
Called from a producer thread subject to the restrictions appropriate to the implementation and according to the
Queue.offer(Object) interface. |
M |
peek()
Called from the consumer thread subject to the restrictions appropriate to the implementation and according to
the
Queue.peek() interface. |
M |
poll()
Called from the consumer thread subject to the restrictions appropriate to the implementation and according to
the
Queue.poll() interface. |
int |
size()
This method's accuracy is subject to concurrent modifications happening as the size is estimated and as such is a
best effort rather than absolute value.
|
boolean offer(M message)
Queue.offer(Object)
interface.message
- the Object to enqueue, not nullM poll()
Queue.poll()
interface.M peek()
Queue.peek()
interface.int size()
Integer.MAX_VALUE
if not boundedboolean isEmpty()
Copyright © 2018. All rights reserved.