jbarrier

edu.bonn.cs.net.jbarrier.barrier
Class StaticTreeBarrier.StaticTreeBarrierParty

java.lang.Object
  extended by edu.bonn.cs.net.jbarrier.barrier.StaticTreeBarrier.StaticTreeBarrierParty
Enclosing class:
StaticTreeBarrier

protected class StaticTreeBarrier.StaticTreeBarrierParty
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  int id_
          Unique id of this party [0 .. numParties-1].
protected  int LEFT_CHILD
          Pre-computed constant that represents the ID of my left child in the tree.
protected  int RIGHT_CHILD
          Pre-computed constant that represents the ID of my right child in the tree.
protected  boolean sense_
          Sense flag that switches between true and false.
protected  int THRESH
          Pre-computed constant that indicates the first leaf node.
 
Constructor Summary
protected StaticTreeBarrier.StaticTreeBarrierParty(int id)
          Constructor.
 
Method Summary
protected  void await()
          Called when this party reaches the barrier.
 
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.


THRESH

protected final int THRESH
Pre-computed constant that indicates the first leaf node.


LEFT_CHILD

protected final int LEFT_CHILD
Pre-computed constant that represents the ID of my left child in the tree.


RIGHT_CHILD

protected final int RIGHT_CHILD
Pre-computed constant that represents the ID of my right child in the tree.

Constructor Detail

StaticTreeBarrier.StaticTreeBarrierParty

protected StaticTreeBarrier.StaticTreeBarrierParty(int id)
Constructor.

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

await

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


jbarrier

Copyright 2010 Patrick Peschlow