Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mpisws.p2p.transport.liveness
Interface LivenessProvider<Identifier>

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, TLPastryNode

    public interface LivenessProvider<Identifier>

Expands the Trasnport Layer to include pings and liveness checks.

Author:
  Jeff Hoye

Method Summary
`void` | `addLivenessListener(LivenessListener<Identifier> name)`
`boolean` | `checkLiveness(Identifier i, java.util.Map<java.lang.String,java.lang.Object> options)` Returns wether a new notification will occur.
`void` | `clearState(Identifier i)` Force layer to clear the existing state related to the Identifier.
`int` | `getLiveness(Identifier i, java.util.Map<java.lang.String,java.lang.Object> options)`
`boolean` | `removeLivenessListener(LivenessListener<Identifier> name)`

Method Detail

### 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 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)

### 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` -

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.