org.mpisws.p2p.transport.liveness
Interface LivenessProvider<Identifier>
- All Superinterfaces:
- LivenessTypes
- All Known Subinterfaces:
- GenericNetworkSimulator<Identifier,MessageType>, LivenessTransportLayer<Identifier,MsgType>, SourceRouteManager<Identifier>, UpperIdentity<Identifier,MessageType>
- All Known Implementing Classes:
- AggressiveLivenessTransportLayerImpl, BasicNetworkSimulator, LivenessTransportLayerImpl, NodeHandleAdapter, PastryNode, RendezvousLivenessProvider, SourceRouteManagerImpl
public interface LivenessProvider<Identifier>
- extends LivenessTypes
Expands the Transport Layer to include pings and liveness checks.
- Author:
- Jeff Hoye
getLiveness
int getLiveness(Identifier i,
java.util.Map<java.lang.String,java.lang.Object> options)
checkLiveness
boolean checkLiveness(Identifier i,
java.util.Map<java.lang.String,java.lang.Object> options)
- Returns whether 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 concerns
addLivenessListener
void addLivenessListener(LivenessListener<Identifier> name)
removeLivenessListener
boolean removeLivenessListener(LivenessListener<Identifier> name)
clearState
void clearState(Identifier i)
- Force layer to clear the existing state related to the Identifier. Usually
if there is reason to believe a node has returned.
- Parameters:
i
-
Copyright © 2001-2005 - Rice Pastry.