|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpeersim.core.CommonState
peersim.cdsim.CDState
public class CDState
This is the common state of a cycle driven simulation that all objects see.
It contains additional information, specific to the cycle driven model,
in addition to the info in CommonState.
| Parameter Summary |
|---|
| Parameters inherited from class peersim.core.CommonState |
|---|
random, random.seed |
| Field Summary |
|---|
| Fields inherited from class peersim.core.CommonState |
|---|
PHASE_UNKNOWN, POST_SIMULATION, r |
| Method Summary | |
|---|---|
static int |
getCycle()
Returns the current cycle. |
static java.lang.Integer |
getCycleObj()
Returns current cycle as an Integer object. |
static int |
getCycleT()
Returns the current time within the current cycle. |
static boolean |
isCD()
Returns true if and only if there is a cycle driven simulation going on. |
static void |
setCycle(int t)
Sets current cycle. |
static void |
setCycleT(int t)
|
| Methods inherited from class peersim.core.CommonState |
|---|
getEndTime, getIntTime, getNode, getPhase, getPid, getTime, initializeRandom, setEndTime, setNode, setPhase, setPid, setTime |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isCD()
public static int getCycle()
CommonState.getTime() returns the same value.
java.lang.UnsupportedOperationException - if no cycle-driven state is availablepublic static void setCycle(int t)
CommonState.setTime(long) with the given parameter, to make sure
CommonState.getTime() is indeed independent of the simulation model.
public static java.lang.Integer getCycleObj()
java.lang.UnsupportedOperationException - if no cycle-driven state is availablepublic static int getCycleT()
getCycle() is the cycle id
in this case. In other words, it returns the number of nodes that have
already been visited in a given cycle.
java.lang.UnsupportedOperationException - if no cycle-driven state is availablepublic static void setCycleT(int t)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||