jbarrier

edu.bonn.cs.net.jbarrier.barrier
Class TournamentBarrier.TournamentBarrierParty

java.lang.Object
  extended by edu.bonn.cs.net.jbarrier.barrier.TournamentBarrier.TournamentBarrierParty
Enclosing class:
TournamentBarrier

protected class TournamentBarrier.TournamentBarrierParty
extends java.lang.Object

Stores data required by each party that uses the barrier.

Version:
1.0
Author:
Patrick Peschlow, Ivan Castilla Rodriguez

Field Summary
protected  java.util.concurrent.atomic.AtomicBoolean[] flags_
          My set of flags to be set/queried during the barrier.
protected  int id_
          Unique id of this party [0 .. numParties-1].
protected  TournamentBarrier.Round[] rounds_
          Pre-computed information about the rounds of the barrier.
protected  boolean sense_
          Sense flag that switches between true and false.
 
Constructor Summary
protected TournamentBarrier.TournamentBarrierParty(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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id_

protected final int id_
Unique id of this party [0 .. numParties-1].


sense_

protected boolean sense_
Sense flag that switches between true and false.


rounds_

protected final TournamentBarrier.Round[] rounds_
Pre-computed information about the rounds of the barrier.


flags_

protected final java.util.concurrent.atomic.AtomicBoolean[] flags_
My set of flags to be set/queried during the barrier.

Constructor Detail

TournamentBarrier.TournamentBarrierParty

protected TournamentBarrier.TournamentBarrierParty(int id)
Constructor.

Parameters:
id - the numeric id of this thread within the barrier.
Method Detail

setupBarrier

protected void setupBarrier()
Sets up this party for the barrier algorithm.


await

protected void await()
Called when this party reaches the barrier.


jbarrier

Copyright 2010 Patrick Peschlow