|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcgl.narada.protocol.Gateway
public class Gateway
Gateway.java The individual element in the connectivity graph which we construct to -
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
Gateway(Gateway vertexNode,
NodeAddress node,
short level)
This constructor is used to process the information that would be exchanged during the process of unit addition or the addition of a gateway. |
|
Gateway(NodeAddress node,
short level,
boolean isVertex)
This constructor is used the first time a node is assigned a logical address. |
|
| Method Summary | |
|---|---|
Path |
computeShortestPathTo(Gateway gateway,
Path path)
The recursive call which computes the cost required to reach any given gateway within the system. |
Path |
computeShortestPathToVertex(Path path)
The recursive call which computes the cost required to reach the vertex gateway within the system. |
void |
connectedToGateway(Gateway gateway)
This hooks up two gateway nodes in the connectivity graph. |
boolean |
containedInRoutingInformation(byte[] routingInformation)
Based on the routing information received at a server node, we need to know wether or not we should employ certain hops in the routing information. |
boolean |
containedInRoutingInformation(Destinations routingInformation)
Based on the routing information received at a server node, we need to know wether or not we should employ certain hops in the routing information. |
protected void |
createDownLink(Gateway gateway)
|
protected void |
createLateralAndUpLink(Gateway gateway)
|
int |
disconnectedFromGateway(Gateway gateway)
When a level-l gateway fails, or is added, the shortest paths and next best hop to reach the vertex node needs to be computed for all level-l gateways, and l+1 ... |
boolean |
equals(Object obj)
Compares two objects for equality. |
short |
getLevel()
Returns the level that this node exists in within the connectivity graph |
NodeAddress |
getNode()
Provides the node address of the gateway node in the connectivity graph. |
int |
hashCode()
Generates a hash code for the receiver. |
void |
invalidateVertexPath()
This method forces the invalidation of the vertex path so that a new path is forced to be computed |
static void |
main(String[] args)
|
protected void |
removeDownLink(Gateway gateway)
|
protected void |
removeLateralAndUpLink(Gateway gateway)
|
int |
reportPartitionStatus()
If the lateralAndUpLink sizes are zero, a node is unit partitioned. |
String |
toString()
This method is implemented to enable a System.out.println() on the gateway node. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Gateway(NodeAddress node, short level, boolean isVertex)
node - - The node address of the hosting server nodelevel - - The level of the system that this node is a part of.isVertex - - Indication that this node is the vertex for the
connectivity graph that would be constructed for the node.public Gateway(Gateway vertexNode, NodeAddress node, short level)
vertexNode - - The node address of the hosting server nodenode - - The nodeAddress of the node that is added to the
connectivity graph.level - - The level of the system that this node is a part of.| Method Detail |
|---|
public NodeAddress getNode()
public short getLevel()
public void connectedToGateway(Gateway gateway)
gateway - - Specifies the gateway node that this node is
connected to.protected void createLateralAndUpLink(Gateway gateway)
protected void createDownLink(Gateway gateway)
protected void removeLateralAndUpLink(Gateway gateway)
protected void removeDownLink(Gateway gateway)
public int disconnectedFromGateway(Gateway gateway)
gateway - - The gateway that has been disconnected.
public int reportPartitionStatus()
public void invalidateVertexPath()
public Path computeShortestPathToVertex(Path path)
path - - The path that is taken by each recursive process. We need
this to ensure that each path traverses a gateway node only once and
does not get stuck inside a recursive infinite loop.public Path computeShortestPathTo(Gateway gateway, Path path)
gateway - - The gateway that you seek to reach.path - - The path that is taken by each recursive process. We need
this to ensure that each path traverses a gateway node only once and
does not get stuck inside a recursive infinite loop.public boolean containedInRoutingInformation(byte[] routingInformation)
routingInformation - - The routing information associated with the
message so far.
public boolean containedInRoutingInformation(Destinations routingInformation)
routingInformation - - The routing information associated with the
message so far.
public String toString()
public boolean equals(Object obj)
obj - the Object to compare with
Hashtablepublic int hashCode()
public static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||