org.mpisws.p2p.transport.liveness
Interface LivenessProvider<Identifier>
- All Known Subinterfaces:
- CertificateTransportLayer, CommonAPITransportLayer<Identifier>, DirectTransportLayer, SourceRouteManager<Identifier>, UpperIdentity<Identifier,MessageType>
- All Known Implementing Classes:
- CommonAPITransportLayerImpl, DirectPastryNode, DistPastryNode, LivenessTransportLayerImpl, PastryNode, SocketPastryNode, SourceRouteManagerImpl, TLPastryNode
public interface LivenessProvider<Identifier>
Expands the Trasnport Layer to include pings and liveness checks.
- Author:
- Jeff Hoye
getLiveness
int getLiveness(Identifier i,
java.util.Map<java.lang.String,java.lang.Integer> options)
checkLiveness
boolean checkLiveness(Identifier i,
java.util.Map<java.lang.String,java.lang.Integer> options)
- Returns wether a new notification will occur.
Will return false if a liveness check has recently completed.
Will return true if a new liveness check starts, or an existing one is in progress.
- Parameters:
i
- the node to check
- Returns:
- true if there will be an update (either a ping, or a change in liveness)
false if there won't be an update due to bandwidth concernts
addLivenessListener
void addLivenessListener(LivenessListener<Identifier> name)
removeLivenessListener
boolean removeLivenessListener(LivenessListener<Identifier> name)
Copyright © 2001-2005 - Rice Pastry.