|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jgroups.protocols.SCOPE.QueueThread
protected class SCOPE.QueueThread
| Field Summary | |
|---|---|
protected boolean |
first
|
protected SCOPE.MessageQueue |
queue
|
| Constructor Summary | |
|---|---|
SCOPE.QueueThread(SCOPE.MessageQueue queue)
|
|
| Method Summary | |
|---|---|
void |
run()
Try to remove as many messages as possible from the queue and pass them up. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final SCOPE.MessageQueue queue
protected boolean first
| Constructor Detail |
|---|
public SCOPE.QueueThread(SCOPE.MessageQueue queue)
| Method Detail |
|---|
public void run()
- Threads T1 and T2 - T1 has the CAS - T1: remove() == null - T2: add() - T2: attempt to set the CAS: false, return - T1: set the CAS to false, return ==> Result: we have a message in the queue that nobody takes care of !
run in interface java.lang.Runnable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||