|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.pastry.socket.SocketSourceRouteManager.AddressManager
protected class 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
Nested Class Summary | |
---|---|
class |
SocketSourceRouteManager.AddressManager.SourceRouteManager
Internal class which is charges with managing the remote connection via a specific route |
Field Summary | |
---|---|
protected SocketNodeHandle |
address
|
protected SourceRoute |
best
the current best route to this remote address if best == null, we are already in a CheckDead, which means we are searching for a path |
protected int |
liveness
|
protected java.util.Vector |
queue
|
protected java.util.HashMap |
routes
|
protected long |
updated
|
Constructor Summary | |
---|---|
SocketSourceRouteManager.AddressManager(SocketNodeHandle address,
boolean search)
Constructor, given an address and whether or not it should attempt to find the best route |
Method Summary | |
---|---|
void |
checkLiveness()
Method which suggests a ping to the remote node. |
int |
getLiveness()
Method which returns the last cached liveness value for the given address. |
protected SocketSourceRouteManager.AddressManager.SourceRouteManager |
getRouteManager(SourceRoute route)
Method which returns the route manager for the given route |
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. |
protected void |
purgeQueue()
|
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 SocketNodeHandle address
protected SourceRoute best
protected java.util.Vector queue
protected java.util.HashMap routes
protected int liveness
protected long updated
Constructor Detail |
---|
public SocketSourceRouteManager.AddressManager(SocketNodeHandle address, boolean search)
address
- The addresssearch
- Whether or not the manager should try and find a routeMethod Detail |
---|
protected SocketSourceRouteManager.AddressManager.SourceRouteManager getRouteManager(SourceRoute route)
route
- The route
java.lang.IllegalArgumentException
- if route is nullpublic int proximity()
address
- The address to return the value for
public int getLiveness()
address
- The address to return the value for
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()
address
- The now-dead addressprotected 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()
protected void setAlive()
java.lang.IllegalStateException
- if best is null.protected void setSuspected()
protected void setDead()
protected void setDeadForever()
protected void purgeQueue()
|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |