|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcgl.narada.protocol.GatewayInfo
public class GatewayInfo
This class keeps track of the gatekeepers that a node should be aware of. This information is used by the the PPP, NOP and GPP suite of protocols. This information is used to determine
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
GatewayInfo()
|
|
GatewayInfo(int systemLevel)
The Gateway Info requires information regarding the system Levels that are available with the system. |
|
| Method Summary | |
|---|---|
void |
addConnection(Connection connection)
This method adds a connection to the GatewayInfo, the connection could comprise of nodes at different levels within the connectivity graph. |
int |
computeLowestNumberedUnitAtLevel(int level)
A utility method that allows us to compute the lowested numbered unit at a given level |
boolean |
containsConnection(ProtocolID connectionId)
This method indicates if a connection already exists within the connectionTable, if this is the case - the connection needs to be removed from the connection table |
void |
enumerateBestHopsToTake()
A test function which enumerates the hops that need to be taken to reach any node in the connectivity graph. |
Gateway |
getBestHopToReachNode(Gateway nodeToReach)
This method returns the best hop that needs to be taken to reach a given node. |
Connection |
getConnection(ProtocolID connectionId)
|
Destinations |
getDestinationsReachedFromHop(Gateway gateway)
Provides the destinations that can be reached from a hop. |
Destinations |
getFastestDestinationsFromHop(Gateway hop)
Returns the destinations that can be reached fastest from the specified hop. |
Gateway[] |
getHops()
This method provides a list of the direct hops that can be taken from the vertex node of the connectivity graph. |
Destinations |
getListOfDestinationsKnownToNode()
This method lists the destinations at different levels that can be reached from this node. |
Gateway[] |
getListOfValidHopsToRoute(byte[] routingInformation)
When presented within a list of destinations that have already been traversed, this method returns a list of hops that can be taken in a manner consistent with our policy of not routing an event to the same node twice. |
int |
getLowestNumberedUnitAtLevel(int level)
This method provides us with the lowest numbered unit at a certain level within the connectivity graph. |
NodeAddress |
getNodeAddress()
Accessor function for retrieving the node address of the server node hosting the connectivity graph. |
int |
getSystemLevel()
This method returns the system level of the system. |
Gateway |
getVertexNode()
Returns the vertex node in the connectivity graph. |
Gateway[] |
hopsToReachDestination(Destinations destinationToReach,
Destinations traversedSoFar)
This method provides a list of links over which a certain event must be sent to reach the destinations computed by the profile matching and contained within the event's routing information. |
Vector |
listTheGatewaysWithinUnitAtLevel(int level)
This method provides us with a list of gateways at a certain level l that exist within the level l units. |
static void |
main(String[] args)
|
byte[] |
prepareConnectionsToSendOverLevel(int level)
In response to a sub system (LEVEL level) being added to an existing system, the node belonging to the system needs to exachange data with regarding gateways at level onwards in the newly merged system. |
void |
processConnectionBuffer(byte[] connectionBuffer)
Process the information received as a byte[] over the link. |
void |
removeConnection(Connection connection)
This method removes a connection from the GatewayInfo, the connection could comprise of nodes at different levels within the connectivity graph. |
void |
removeGatewayInfo(Short level,
Gateway gateway)
React to failure suspicions, update the gateway info available and compute new routes to reach destinations |
void |
setNodeAddress(NodeAddress nodeAddress)
After a node address has been assigned, this method is responsible for setting the node address for the connectivity graph. |
void |
setProtocolHandler(ProtocolHandler protocolHandler)
This method sets the protocolHandler for the node in question. |
void |
setVertexNode(Gateway vertexNode)
This sets the server node hosting the connectivity graph for that node, as the vertex node for computations involving calculation of shortest routes, detection of partitions etc. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GatewayInfo(int systemLevel)
systemLevel - -
The system level.public GatewayInfo()
| Method Detail |
|---|
public int getSystemLevel()
public void setNodeAddress(NodeAddress nodeAddress)
nodeAddress - The node address of the server node hosting the connectivity
graphpublic NodeAddress getNodeAddress()
public void setVertexNode(Gateway vertexNode)
vertexNode - The vertex node for the connectivity graph.public Gateway getVertexNode()
public void setProtocolHandler(ProtocolHandler protocolHandler)
protocolHandler - The protocol Handler for the node in questionpublic boolean containsConnection(ProtocolID connectionId)
connectionId - The connection ID of the connection currently being
disseminated through relevant parts of the sub-system.
public Connection getConnection(ProtocolID connectionId)
public void addConnection(Connection connection)
connection - -
The connection that needs to be added to the connectivity
graph.public void removeConnection(Connection connection)
connection - -
The connection that needs to be removed the connectivity
graph.public Destinations getListOfDestinationsKnownToNode()
public Vector listTheGatewaysWithinUnitAtLevel(int level)
level - This indicates the level of the gateway within a unit at that
level that we are seeking.public byte[] prepareConnectionsToSendOverLevel(int level)
level - -
This is the level of the gateway over the information needs to
be sent.
public void processConnectionBuffer(byte[] connectionBuffer)
connectionBuffer - The sequence of byes received over the link.public Gateway[] getHops()
public Gateway getBestHopToReachNode(Gateway nodeToReach)
nodeToReach - -
Is the (node+level) gateway node that needs to be reached in
the connectivity graph.
public Destinations getFastestDestinationsFromHop(Gateway hop)
hop -
public Destinations getDestinationsReachedFromHop(Gateway gateway)
gateway - -
The hop from the server node hosting the connectivity graph.
public Gateway[] getListOfValidHopsToRoute(byte[] routingInformation)
routingInformation - -
The routing information contained within a message i.e. event,
protocol packets etc.
public void enumerateBestHopsToTake()
public void removeGatewayInfo(Short level,
Gateway gateway)
level - The level of the node that failedgateway - The gateway node in the graph.
public Gateway[] hopsToReachDestination(Destinations destinationToReach,
Destinations traversedSoFar)
public int getLowestNumberedUnitAtLevel(int level)
level - The level for which the lowest numbered unit is sought.public int computeLowestNumberedUnitAtLevel(int level)
public static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||