|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--com.distributed.api.Camera
Class used to implement Global Snapshot Algorithm
| Field Summary | |
static boolean |
GETVAL
Constant used by the entire Class |
boolean |
globalsnapshotreceived
Variable set by users |
static boolean |
SETVAL
Constant used by the entire Class |
| Constructor Summary | |
Camera(Environment parent)
Constructor to be normally used by the Environment |
|
| Method Summary | |
protected boolean |
accessRED(boolean val,
boolean set)
Method to get value of RED while setting it if set is true |
void |
markerReceivedFrom(int pid)
Called when the Marker is received from a process |
void |
saveChannelState(java.lang.String messg,
int source)
used to save the channel state |
void |
turnRed(int source,
int to)
Called when this process should Turn Red |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final boolean GETVAL
public boolean globalsnapshotreceived
public static final boolean SETVAL
| Constructor Detail |
public Camera(Environment parent)
parent - The Parent Environment invoking the Algorithm| Method Detail |
protected boolean accessRED(boolean val,
boolean set)
set - Condition to set RED to valval - New value of RED
public void markerReceivedFrom(int pid)
pid - Process Id of the source of Marker
public void saveChannelState(java.lang.String messg,
int source)
messg - The message to be added to the channel statesource - Process ID of the Source of the Message
public void turnRed(int source,
int to)
source - The Id of the source process of the Markerto - The instigator of Algo, to whom the snapshot should be returned
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||