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.standard.StandardLeafSetProtocol

All Implemented Interfaces:
  MessageReceiver

public class StandardLeafSetProtocol
extends java.lang.Object
implements MessageReceiver

An implementation of a simple leaf set protocol.

Version:
  $Id: StandardLeafSetProtocol.java,v 1.32 2005/03/11 00:58:03 jeffh Exp $
Author:
  Peter Druschel, Andrew Ladd

Field Summary
`protected boolean` | `failstop` DESCRIBE THE FIELD
`protected LeafSet` | `leafSet` DESCRIBE THE FIELD
`protected NodeHandle` | `localHandle` DESCRIBE THE FIELD
`protected PastryNode` | `localNode` DESCRIBE THE FIELD
`protected RoutingTable` | `routeTable` DESCRIBE THE FIELD
`protected PastrySecurityManager` | `security` DESCRIBE THE FIELD

Constructor Summary
`StandardLeafSetProtocol(PastryNode ln, NodeHandle local, PastrySecurityManager sm, 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
`Address` | `getAddress()` Gets the address.
`void` | `maintainLeafSet()` Maintain the leaf set.
`protected boolean` | `mergeLeafSet(LeafSet remotels, NodeHandle from)` Merge a remote leafset into our own
`void` | `receiveMessage(Message msg)` Receives messages.

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

### localHandle

    protected NodeHandle localHandle

  DESCRIBE THE FIELD

### localNode

    protected PastryNode localNode

  DESCRIBE THE FIELD

### security

    protected PastrySecurityManager security

  DESCRIBE THE FIELD

### leafSet

    protected LeafSet leafSet

  DESCRIBE THE FIELD

### routeTable

    protected RoutingTable routeTable

  DESCRIBE THE FIELD

Constructor Detail

### StandardLeafSetProtocol

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

  Constructor for StandardLeafSetProtocol.

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

Method Detail

### getAddress

    public Address getAddress()

  Gets the address.

  Returns:
    the address.

### receiveMessage

    public void receiveMessage(Message msg)

  Receives messages.

  Specified by:
    `receiveMessage` in interface `MessageReceiver`
  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.

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.