|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvisidia.simulation.process.synchronization.SynchronizationObject
public class SynchronizationObject
The class mother of Synchronization objects
Field Summary | |
---|---|
int |
arity
|
int |
center
|
protected boolean[] |
connected
|
protected boolean[] |
edgMark
|
boolean |
run
|
protected java.util.Vector<java.lang.Integer> |
synchroCenters
|
java.util.Vector<java.lang.Integer> |
synDoors
|
int |
synState
|
Constructor Summary | |
---|---|
SynchronizationObject()
|
Method Summary | |
---|---|
void |
addCenter(int i)
Add a new center of synchronization. |
void |
addSynchronizedDoor(int i)
Adds a new synchronized neighbour to synDoors (in synob). |
boolean |
allFinished()
|
java.lang.Object |
clone()
|
java.util.Vector<java.lang.Integer> |
getCenters()
returns the centers of stars. |
int |
getDoor(int i)
Returns the number of the door of synchronized neighbour in position i. |
boolean |
getMark(int neighbour)
|
boolean |
hasFinished(int neighbour)
|
void |
init(int ar)
this method is used to initialize the structures. |
boolean |
isConnected(int i)
|
boolean |
isElected()
Returns true if the node is in elected state, returns false otherwise. |
boolean |
isInStar()
Returns true if the node is in the star, returns false otherwise. |
boolean |
isNotInStar()
Returns true if the node is in not the star, returns false otherwise. |
void |
reset()
clears the structures. |
void |
resetCenters()
vide l'ensemble des centres des etoites de synchronisation. |
boolean |
setConnected(int i,
boolean b)
|
void |
setFinished(int neighbour,
boolean b)
|
void |
setGlobEnd(boolean b)
|
void |
setMark(int neighbour,
boolean mark)
Sets the mark of the neighbour to "mark" |
void |
setState(int synstate)
Sets the synchronisation state of the node. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public java.util.Vector<java.lang.Integer> synDoors
protected boolean[] edgMark
protected boolean[] connected
protected java.util.Vector<java.lang.Integer> synchroCenters
public int center
public int synState
public int arity
public boolean run
Constructor Detail |
---|
public SynchronizationObject()
Method Detail |
---|
public void init(int ar)
ar
- the arity.public void reset()
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void setState(int synstate)
synstate
- possible values are defined in class SynCTpublic boolean isElected()
public boolean isInStar()
public boolean isNotInStar()
public void addSynchronizedDoor(int i)
public void setMark(int neighbour, boolean mark)
neighbour
- the neighbour door.mark
- the new mark state.public boolean getMark(int neighbour)
public int getDoor(int i)
i
- position in synDoors.public boolean isConnected(int i)
public boolean setConnected(int i, boolean b)
public boolean hasFinished(int neighbour)
public boolean allFinished()
public void setGlobEnd(boolean b)
public void setFinished(int neighbour, boolean b)
public void resetCenters()
public void addCenter(int i)
public java.util.Vector<java.lang.Integer> getCenters()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |