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

## rice.pastry.standard
Class StandardLeafSetProtocol

    java.lang.Object
      rice.pastry.client.PastryAppl
          rice.pastry.standard.StandardLeafSetProtocol

All Implemented Interfaces:
  java.util.Observer

    public class StandardLeafSetProtocol

extends PastryAppl

An implementation of a simple leaf set protocol.

Version:
  $Id: StandardLeafSetProtocol.java 3404 2006-09-13 16:30:22Z jeffh $
Author:
  Peter Druschel, Andrew Ladd

Field Summary
`protected boolean` | `failstop` DESCRIBE THE FIELD
`protected LeafSet` | `leafSet` DESCRIBE THE FIELD
`protected Logger` | `logger` DESCRIBE THE FIELD
`protected RoutingTable` | `routeTable` DESCRIBE THE FIELD

Fields inherited from class rice.pastry.client.PastryAppl
`address, deserializer, instance, receiver, thePastryNode`

Constructor Summary
`StandardLeafSetProtocol(PastryNode ln, NodeHandle local, LeafSet ls, RoutingTable rt)` Constructor for StandardLeafSetProtocol.

Method Summary
`protected void` | `broadcast()` Broadcast the leaf set to all members of the local leaf set.
`protected void` | `broadcast(int type)` Broadcast the leaf set to all members of the local leaf set.
`protected void` | `broadcast(LeafSet ls, NodeHandle from)` Broadcast the local leaf set to all members of the given leaf set, plus the node from which the leaf set was received.
`protected boolean` | `checkLeafSet(LeafSet remotels, NodeHandle from, boolean notifyMissing)` Checks a received leafset advertisement for missing nodes
`boolean` | `deliverWhenNotReady()` DESCRIBE THE METHOD
`void` | `maintainLeafSet()` Maintain the leaf set.
`protected boolean` | `mergeLeafSet(LeafSet remotels, NodeHandle from)` Merge a remote leafset into our own
`void` | `messageForAppl(Message msg)` Receives messages.

Methods inherited from class rice.pastry.client.PastryAppl
`accept, connect, destroy, enrouteMessage, getAddress, getLeafSet, getNodeHandle, getNodeId, getRoutingTable, isClosest, leafSetChange, notifyReady, receiveMessage, receiveMessageInternal, receiveSocket, register, routeMsg, routeMsgDirect, routeSetChange, setDeserializer, update`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### failstop

    protected final boolean failstop

  DESCRIBE THE FIELD

  See Also:
    Constant Field Values

### leafSet

    protected LeafSet leafSet

  DESCRIBE THE FIELD

### routeTable

    protected RoutingTable routeTable

  DESCRIBE THE FIELD

### logger

    protected Logger logger

  DESCRIBE THE FIELD

Constructor Detail

### StandardLeafSetProtocol

    public StandardLeafSetProtocol(PastryNode ln,
                                   NodeHandle local,
                                   LeafSet ls,
                                   RoutingTable rt)

  Constructor for StandardLeafSetProtocol.

  Parameters:
    `ln` - DESCRIBE THE PARAMETER
    `local` - DESCRIBE THE PARAMETER
    `ls` - DESCRIBE THE PARAMETER
    `rt` - DESCRIBE THE PARAMETER

Method Detail

### messageForAppl

    public void messageForAppl(Message msg)

  Receives messages.

  Specified by:
    `messageForAppl` in class `PastryAppl`
  Parameters:
    `msg` - the message.

### checkLeafSet

    protected boolean checkLeafSet(LeafSet remotels,
                                   NodeHandle from,
                                   boolean notifyMissing)

  Checks a received leafset advertisement for missing nodes

  Parameters:
    `remotels` - the remote leafset
    `from` - the node from which we received the leafset
    `notifyMissing` - if true, notify missing nodes
  Returns:
    true if any nodes where found missing in the received leafset

### mergeLeafSet

    protected boolean mergeLeafSet(LeafSet remotels,
                                   NodeHandle from)

  Merge a remote leafset into our own

  Parameters:
    `remotels` - the remote leafset
    `from` - the node from which we received the leafset
  Returns:
    true if the leafset changed

### broadcast

    protected void broadcast()

  Broadcast the leaf set to all members of the local leaf set.

### broadcast

    protected void broadcast(int type)

  Broadcast the leaf set to all members of the local leaf set.

  Parameters:
    `type` - the type of broadcast message used

### broadcast

    protected void broadcast(LeafSet ls,
                             NodeHandle from)

  Broadcast the local leaf set to all members of the given leaf set, plus the node from which the leaf set was received.

  Parameters:
    `ls` - the leafset whose members we send to local leaf set
    `from` - the node from which ls was received

### maintainLeafSet

    public void maintainLeafSet()

  Maintain the leaf set. This method checks for dead leafset entries and replaces them as needed. It is assumed that this method be invoked periodically.

### deliverWhenNotReady

    public boolean deliverWhenNotReady()

  DESCRIBE THE METHOD

  Overrides:
    `deliverWhenNotReady` in class `PastryAppl`
  Returns:
    DESCRIBE THE RETURN VALUE

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.