public final class FQMessageQueue extends java.lang.Object implements MessageQueue
We also count on writers not to call the isEmpty() method
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
FQMessageQueue.EmptyNode |
(package private) static class |
FQMessageQueue.Node |
| Modifier and Type | Field and Description |
|---|---|
private FQMessageQueue.Node |
inside |
private FQMessageQueue.Node |
outside |
private java.util.concurrent.atomic.AtomicReferenceFieldUpdater |
outsideUpdater |
| Constructor and Description |
|---|
FQMessageQueue() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.Object element) |
boolean |
isEmpty() |
java.lang.Object |
poll() |
private java.lang.Object |
pollFromInside() |
private volatile FQMessageQueue.Node outside
private FQMessageQueue.Node inside
private final java.util.concurrent.atomic.AtomicReferenceFieldUpdater outsideUpdater
public boolean isEmpty()
isEmpty in interface MessageQueuepublic java.lang.Object poll()
poll in interface MessageQueueprivate java.lang.Object pollFromInside()
public void add(java.lang.Object element)
add in interface MessageQueue