org.mpisws.p2p.transport.proximity
Class MinRTTProximityProvider.EntityManager
java.lang.Object
org.mpisws.p2p.transport.proximity.MinRTTProximityProvider.EntityManager
- Enclosing class:
- MinRTTProximityProvider<Identifier>
public class MinRTTProximityProvider.EntityManager
- extends Object
Internal class which is charges with managing the remote connection via
a specific route
identifier
protected Identifier identifier
proximity
protected int proximity
lastPingTime
protected long lastPingTime
MinRTTProximityProvider.EntityManager
public MinRTTProximityProvider.EntityManager(Identifier route)
- Constructor - builds a route manager given the route
- Parameters:
route - The route
ping
public void ping(Map<String,Object> options)
proximity
public int proximity()
- Method which returns the last cached proximity value for the given address.
If there is no cached value, then DEFAULT_PROXIMITY is returned.
- Parameters:
address - The address to return the value for
- Returns:
- The ping value to the remote address
markProximity
protected void markProximity(int proximity,
Map<String,Object> options)
- This method should be called when this route has its proximity updated
- Parameters:
proximity - The proximity
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2010. All Rights Reserved.