|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcgl.narada.protocol.Destinations
public class Destinations
This class maintains the destinations that are associated with any given node in the connectivity graph. The class contains utilities methods for updating destination lists and also for the invalidation of specific entries in the destination Lists.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
Destinations(byte[] routingInformation)
Constructs a destinations object, with the routing information received as a sequence of bytes. |
|
Destinations(int systemLevel)
Constructs a destination list with the specified systemLevel indicator |
|
| Method Summary | |
|---|---|
Destinations |
computeDestinationsThatCannotBeReached(Destinations destinationsToReach)
Given a set of destinations that needs to be reached. |
boolean |
equals(Object obj)
Compares two objects for equality. |
int |
getDestinationsAtLevel(int level)
This method gets the destinations that need to be reached at a given level. |
byte[] |
getDestinationsInBytes()
Returns the destinations as a sequence of bytes |
int[] |
getDestinationsInInts()
Returns the destinations as a sequence of integers |
int |
getSystemLevel()
Returns the systemLevel associated with the destination |
int |
hashCode()
Generates a hash code for the receiver. |
void |
invalidateDestinationsAtLevel(int gatewayLevel)
For a destination list associated with a hop, in response to the addition or failure of a gatewayLevel connection, the shortest path to nodes => gatewayLevel is updated. |
static void |
main(String[] args)
|
void |
markAsTraversedAt(Destinations destinationToBeAdded)
Every node has a destination identifier. |
byte[] |
prepareDestinationsToSendOverLevel(int level)
When a destination is being sent over a Level level gateway, the system is not interested in the destinations that exist at lower levels. |
void |
removeFromDestinationList(Gateway gateway)
This method eliminates the provided gateway's entry from the set of destinations encapsulated within this structure. |
void |
setDestinationsAtLevel(int level,
int value)
This method sets the destinations at a given level |
String |
toString()
|
void |
updateDestinationList(Destinations _destination)
This is added to account for the MatchingProblem scenario |
void |
updateDestinationList(Gateway gateway)
This updates the destinations associated with a certain hop. |
void |
updateWithDestination(Destinations _update)
Java objects are passed by reference. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Destinations(int systemLevel)
systemLevel - - The level of the system.public Destinations(byte[] routingInformation)
routingInformation - - The sequence of bytes that constitutes the
routing information| Method Detail |
|---|
public void updateWithDestination(Destinations _update)
public void updateDestinationList(Gateway gateway)
gateway - The gateway in the connectivity graph which can be
reached the fastest from the hop in questionpublic void removeFromDestinationList(Gateway gateway)
gateway - The gateway in the connectivity graph that will be
removed.public void updateDestinationList(Destinations _destination)
public void invalidateDestinationsAtLevel(int gatewayLevel)
gatewayLevel - - The levels that need to be invalidatedpublic byte[] getDestinationsInBytes()
public int[] getDestinationsInInts()
public int getSystemLevel()
public String toString()
toString in class Objectpublic int getDestinationsAtLevel(int level)
level - The destinations that need to be retrieved for a given
level.
public void setDestinationsAtLevel(int level,
int value)
level - - The level for which the destination needs to be updatedvalue - - The destinations for level encoded within the
integer valuepublic Destinations computeDestinationsThatCannotBeReached(Destinations destinationsToReach)
public boolean equals(Object obj)
equals in class Objectobj - the Object to compare with
Hashtablepublic int hashCode()
hashCode in class Objectpublic byte[] prepareDestinationsToSendOverLevel(int level)
level - The gateway level over which the destinations are gonna be
sent over.
public void markAsTraversedAt(Destinations destinationToBeAdded)
destinationToBeAdded - The destination associated with the server
node.public static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||