|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrice.pastry.socket.SocketSourceRouteManager.AddressManager
Internal class which is tasked with maintaining the status of a single remote address. This class is in charge of all source routes to that address, as well as declaring liveness/death of this address
Field Summary | |
protected EpochInetSocketAddress |
address
DESCRIBE THE FIELD |
protected SourceRoute |
best
DESCRIBE THE FIELD |
protected java.util.HashSet |
deadRoutes
DESCRIBE THE FIELD |
protected int |
liveness
DESCRIBE THE FIELD |
protected java.util.HashSet |
pendingRoutes
DESCRIBE THE FIELD |
protected int |
proximity
DESCRIBE THE FIELD |
protected java.util.Vector |
queue
DESCRIBE THE FIELD |
Constructor Summary | |
SocketSourceRouteManager.AddressManager(EpochInetSocketAddress address,
boolean search)
Constructor, given an address |
Method Summary | |
void |
checkLiveness()
Method which suggests a ping to the remote node. |
protected void |
checkRoute(SourceRoute route)
Method which checks to see if the given address is dead |
int |
getLiveness()
Method which returns the last cached liveness value for the given address. |
protected void |
markAlive(SourceRoute route)
This method should be called when a known route is declared alive. |
protected void |
markDead(SourceRoute route)
This method should be called when a known route is declared dead. |
protected void |
markDeadForever()
This method should be called when a known node is declared dead - this is ONLY called when a new epoch of that node is detected. |
protected void |
markProximity(SourceRoute route,
int proximity)
This method should be called when a known route has its proximity updated |
protected void |
markSuspected(SourceRoute route)
This method should be called when a known route is declared suspected. |
void |
ping()
Method which suggests a ping to the remote node. |
int |
proximity()
Method which returns the last cached proximity value for the given address. |
void |
send(Message message)
Method which enqueues a message to this address |
protected void |
setAlive()
Internal method which marks this address as being alive. |
protected void |
setDead()
Internal method which marks this address as being dead. |
protected void |
setDeadForever()
Internal method which marks this address as being dead. |
protected void |
setSuspected()
Internal method which marks this address as being suspected. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected EpochInetSocketAddress address
protected SourceRoute best
protected java.util.Vector queue
protected java.util.HashSet deadRoutes
protected java.util.HashSet pendingRoutes
protected int liveness
protected int proximity
Constructor Detail |
public SocketSourceRouteManager.AddressManager(EpochInetSocketAddress address, boolean search)
address
- DESCRIBE THE PARAMETERsearch
- DESCRIBE THE PARAMETERMethod Detail |
public int getLiveness()
protected void setAlive()
protected void setSuspected()
protected void setDead()
protected void setDeadForever()
protected void markAlive(SourceRoute route)
route
- The now-live routeprotected void markSuspected(SourceRoute route)
route
- The now-suspected routeprotected void markDead(SourceRoute route)
route
- The now-dead routeprotected void markDeadForever()
protected void markProximity(SourceRoute route, int proximity)
route
- The routeproximity
- The proximitypublic void send(Message message)
message
- The message to sendpublic void ping()
public void checkLiveness()
public int proximity()
protected void checkRoute(SourceRoute route)
route
- The route to check
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |