|
jbarrier | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.bonn.cs.net.jbarrier.barrier.ButterflyBarrier.ButterflyBarrierParty
protected class ButterflyBarrier.ButterflyBarrierParty
Stores data required by each party that uses the barrier.
Field Summary | |
---|---|
protected java.util.concurrent.atomic.AtomicBoolean[][] |
flagsIn_
Array of incoming flags for this thread for each round. |
protected int |
id_
Unique id of this party [0 .. numParties-1]. |
protected boolean |
outSense_
Sense flag for the global out flag (only used if there is a barrier action). |
protected int |
parity_
Parity bit for alternating barrier episodes. |
protected ButterflyBarrier.ButterflyBarrierParty[] |
partners_
Pre-computed array of references to the partners of this party in each round. |
protected boolean |
sense_
Sense flag that switches between true and
false . |
Constructor Summary | |
---|---|
protected |
ButterflyBarrier.ButterflyBarrierParty(int id)
Constructor. |
Method Summary | |
---|---|
protected void |
await()
Called when this party reaches the barrier. |
protected void |
setupBarrier()
Sets up this party for the barrier algorithm. |
protected void |
setUpPartyData()
Sets up the partners array, intended to be overridden in subclasses. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final int id_
protected final java.util.concurrent.atomic.AtomicBoolean[][] flagsIn_
protected int parity_
protected boolean sense_
true
and
false
.
protected boolean outSense_
protected ButterflyBarrier.ButterflyBarrierParty[] partners_
Constructor Detail |
---|
protected ButterflyBarrier.ButterflyBarrierParty(int id)
id
- the numeric id of this party within the barrier.Method Detail |
---|
protected void setUpPartyData()
protected void setupBarrier()
protected void await()
|
jbarrier | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |