org.mpisws.p2p.transport.liveness
Class LivenessTransportLayerImpl.EntityManager

java.lang.Object
  extended by org.mpisws.p2p.transport.liveness.LivenessTransportLayerImpl.EntityManager
Enclosing class:
LivenessTransportLayerImpl<Identifier>

public class LivenessTransportLayerImpl.EntityManager
extends Object

Internal class which is charges with managing the remote connection via a specific route


Field Summary
protected  WeakReference<Identifier> identifier
           
protected  int liveness
           
protected  Set<org.mpisws.p2p.transport.liveness.LivenessTransportLayerImpl.LSocket> sockets
           
protected  long updated
           
 
Constructor Summary
LivenessTransportLayerImpl.EntityManager(Identifier identifier)
          Constructor - builds a route manager given the route
 
Method Summary
protected  boolean checkLiveness(Map<String,Object> options)
          Method which checks to see this route is dead.
 void destroy()
           
 LivenessTransportLayerImpl.DeadChecker getPending()
           
protected  void markAlive(Map<String,Object> options)
          This method should be called when this route is declared alive.
protected  void markDead(Map<String,Object> options)
          This method should be called when this route is declared dead.
protected  void markDeadForever(Map<String,Object> options)
           
protected  void markDeadHelper(int liveness, Map<String,Object> options, boolean notify)
           
protected  void markSuspected(Map<String,Object> options)
          This method should be called when this route is declared suspected.
 void removeSocket(org.mpisws.p2p.transport.liveness.LivenessTransportLayerImpl.LSocket socket)
           
 int rto()
           
 void setPending(LivenessTransportLayerImpl.DeadChecker d)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

identifier

protected WeakReference<Identifier> identifier

liveness

protected int liveness

updated

protected long updated

sockets

protected Set<org.mpisws.p2p.transport.liveness.LivenessTransportLayerImpl.LSocket> sockets
Constructor Detail

LivenessTransportLayerImpl.EntityManager

public LivenessTransportLayerImpl.EntityManager(Identifier identifier)
Constructor - builds a route manager given the route

Parameters:
route - The route
Method Detail

getPending

public LivenessTransportLayerImpl.DeadChecker getPending()

setPending

public void setPending(LivenessTransportLayerImpl.DeadChecker d)

removeSocket

public void removeSocket(org.mpisws.p2p.transport.liveness.LivenessTransportLayerImpl.LSocket socket)

rto

public int rto()

markAlive

protected void markAlive(Map<String,Object> options)
This method should be called when this route is declared alive.


markSuspected

protected void markSuspected(Map<String,Object> options)
This method should be called when this route is declared suspected.


markDead

protected void markDead(Map<String,Object> options)
This method should be called when this route is declared dead.


markDeadForever

protected void markDeadForever(Map<String,Object> options)

markDeadHelper

protected void markDeadHelper(int liveness,
                              Map<String,Object> options,
                              boolean notify)

checkLiveness

protected boolean checkLiveness(Map<String,Object> options)
Method which checks to see this route is dead. If this address has been checked within the past CHECK_DEAD_THROTTLE millis, then this method does not actually do a check.

Returns:
true if there will be an update (either a ping, or a change in liveness)

toString

public String toString()
Overrides:
toString in class Object

destroy

public void destroy()


Copyright © 2010. All Rights Reserved.