Rice Pastry API

rice.pastry.standard
Class ConsistentJoinProtocol

java.lang.Object
  extended byrice.pastry.standard.StandardJoinProtocol
      extended byrice.pastry.standard.ConsistentJoinProtocol
All Implemented Interfaces:
MessageReceiver, java.util.Observer

public class ConsistentJoinProtocol
extends StandardJoinProtocol
implements java.util.Observer

Does not setReady until contacting entire leafset which gossips new members. Provides consistency as long as checkLiveness() never incorrectly reports a node faulty. Based on MSR-TR-2003-94. The difference is that our assumption that checkLiveness() is much stronger because we are using DSR rather than checking ourself. Another difference is that we are unwilling to pull nodes from our leafset without checkingLiveness() ourself.

Version:
$Id: pretty.settings,v 1.3 2005/03/11 20:22:33 jeffh Exp $
Author:
Jeff Hoye

Field Summary
static int RETRY_INTERVAL
          Will retry sending ConsistentJoinMsg to all neighbors who have not responded on this interval.
 
Fields inherited from class rice.pastry.standard.StandardJoinProtocol
address, leafSet, localHandle, localNode, routeTable, security
 
Constructor Summary
ConsistentJoinProtocol(PastryNode ln, NodeHandle lh, PastrySecurityManager sm, RoutingTable rt, LeafSet ls)
          Constructor takes in the usual suspects.
 
Method Summary
 void addToLeafSet(NodeHandle nh)
          Observes all NodeHandles added to LeafSet
 void receiveMessage(Message msg)
          Handle the CJM as in the MSR-TR
 void requestFromEveryoneWeHaventHeardFrom()
          DESCRIBE THE METHOD
 void sendTheMessage(NodeHandle nh, boolean reply)
          Sends a consistent join protocol message.
protected  void setReady()
          This is where we start out, when the StandardJoinProtocol would call setReady();
 void update(java.util.Observable arg0, java.lang.Object arg)
          Can be leafset updates, or nodehandle updates.
 java.util.Collection whoDoWeNeedAResponseFrom()
          Returns all members of the leafset that are not in gotResponse
 
Methods inherited from class rice.pastry.standard.StandardJoinProtocol
broadcastRows, getAddress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RETRY_INTERVAL

public static final int RETRY_INTERVAL
Will retry sending ConsistentJoinMsg to all neighbors who have not responded on this interval. Only necessary if somehow the message was dropped.

See Also:
Constant Field Values
Constructor Detail

ConsistentJoinProtocol

public ConsistentJoinProtocol(PastryNode ln,
                              NodeHandle lh,
                              PastrySecurityManager sm,
                              RoutingTable rt,
                              LeafSet ls)
Constructor takes in the usual suspects.

Parameters:
ln - DESCRIBE THE PARAMETER
lh - DESCRIBE THE PARAMETER
sm - DESCRIBE THE PARAMETER
rt - DESCRIBE THE PARAMETER
ls - DESCRIBE THE PARAMETER
Method Detail

setReady

protected void setReady()
This is where we start out, when the StandardJoinProtocol would call setReady();

Overrides:
setReady in class StandardJoinProtocol

addToLeafSet

public void addToLeafSet(NodeHandle nh)
Observes all NodeHandles added to LeafSet

Parameters:
nh - the nodeHandle to add

requestFromEveryoneWeHaventHeardFrom

public void requestFromEveryoneWeHaventHeardFrom()
DESCRIBE THE METHOD


whoDoWeNeedAResponseFrom

public java.util.Collection whoDoWeNeedAResponseFrom()
Returns all members of the leafset that are not in gotResponse

Returns:

receiveMessage

public void receiveMessage(Message msg)
Handle the CJM as in the MSR-TR

Specified by:
receiveMessage in interface MessageReceiver
Overrides:
receiveMessage in class StandardJoinProtocol
Parameters:
msg - DESCRIBE THE PARAMETER

sendTheMessage

public void sendTheMessage(NodeHandle nh,
                           boolean reply)
Sends a consistent join protocol message.

Parameters:
nh -
reply -

update

public void update(java.util.Observable arg0,
                   java.lang.Object arg)
Can be leafset updates, or nodehandle updates.

Specified by:
update in interface java.util.Observer
Parameters:
arg0 - DESCRIBE THE PARAMETER
arg - DESCRIBE THE PARAMETER

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.