|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTopology
public class Topology
Topology class keeps track of connections between nodes. This is a Singleton object
Method Summary | |
---|---|
boolean |
failEdge(int a,
int b)
Mark the given edge as failed so that we don't use it |
void |
failNode(int a)
Mark the given node as failed, so that we don't use any edge that goes through it |
static Topology |
GetInstance()
Static method for getting an instance of Topology |
static Topology |
GetInstance(boolean allToAll)
Static method for getting an instance of Topology |
Edge |
getLiveEdge(int a,
int b)
Returns the edge between a and b, if one exists and it is live. |
boolean |
isNodeAlive(int node)
Returns true if the given node is alive, else return false |
void |
newEdge(int a,
int b,
EdgeOptions options)
Creates a new edge or updates an existing one |
boolean |
restartEdge(int a,
int b)
Restart the given edge so that we can use it again |
void |
restartNode(int a)
Mark the given node as ok, so that we can use it again |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Topology GetInstance()
public static Topology GetInstance(boolean allToAll)
public Edge getLiveEdge(int a, int b)
a
- Int specifying a nodeb
- Int specifying a node
public boolean isNodeAlive(int node)
node
- Int specifying nodepublic void newEdge(int a, int b, EdgeOptions options)
a
- Int specifying a nodeb
- Int specifying a nodeoptions
- Options to set for the given edgepublic boolean failEdge(int a, int b)
a
- Int specifying a nodeb
- Int specifying a node
public boolean restartEdge(int a, int b)
a
- Int specifying a nodeb
- Int specifying a node
public void failNode(int a)
a
- Int specifying a nodepublic void restartNode(int a)
a
- Int specifying a node
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |