| 
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectrice.p2p.replication.ReplicationImpl
| Nested Class Summary | |
protected  class | 
ReplicationImpl.BloomFilterExecutable
Internal class which is an executable for creating a bloom filter  | 
| Field Summary | |
protected  ReplicationClient | 
client
This replication's client  | 
protected  Endpoint | 
endpoint
this application's endpoint  | 
protected  IdFactory | 
factory
The factory for create IdSets and IdRanges  | 
protected  NodeHandle | 
handle
the local node handle  | 
protected  java.lang.String | 
instance
The instance name of the replication  | 
protected  java.util.logging.Logger | 
log
the logger which we will use  | 
static int | 
MAINTENANCE_INTERVAL
The amount of time to wait between replications  | 
static int | 
MAX_KEYS_IN_MESSAGE
The maximum number of keys to return in one message  | 
protected  ReplicationPolicy | 
policy
This replication's policy, which allows for application-specific replication  | 
protected  int | 
replicationFactor
The replication factor for this replication  | 
static boolean | 
verbose
DESCRIBE THE FIELD  | 
| Constructor Summary | |
ReplicationImpl(Node node,
                ReplicationClient client,
                int replicationFactor,
                java.lang.String instance)
Constructor  | 
|
ReplicationImpl(Node node,
                ReplicationClient client,
                int replicationFactor,
                java.lang.String instance,
                ReplicationPolicy policy)
Constructor  | 
|
| Method Summary | |
 void | 
deliver(Id id,
        Message message)
This method is called on the application at the destination node for the given id.  | 
 boolean | 
forward(RouteMessage message)
This method is invoked on applications when the underlying node is about to forward the given message with the provided target to the specified next hop.  | 
protected  IdRange | 
getTotalRange()
Returns the range for which the local node is an i root, where i can range between 0 and replicationFactor  | 
static IdSet | 
merge(IdFactory factory,
      IdSet a,
      IdSet b)
Internal method which takes returns set A + set B, or all of the members of set A and set B.  | 
 void | 
replicate()
This internal method sends out the request messages to all of the nodes which hold keys this node may be interested in  | 
 void | 
update(NodeHandle handle,
       boolean joined)
This method is invoked to inform the application that the given node has either joined or left the neighbor set of the local node, as the set would be returned by the neighborSet call.  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
protected Endpoint endpoint
protected java.util.logging.Logger log
protected NodeHandle handle
protected IdFactory factory
protected ReplicationClient client
protected ReplicationPolicy policy
protected int replicationFactor
protected java.lang.String instance
public static final boolean verbose
public static int MAINTENANCE_INTERVAL
public static int MAX_KEYS_IN_MESSAGE
| Constructor Detail | 
public ReplicationImpl(Node node,
                       ReplicationClient client,
                       int replicationFactor,
                       java.lang.String instance)
node - The node below this Replication implementationclient - The client for this ReplicationreplicationFactor - The replication factor for this instanceinstance - The unique instance name of this Replication
public ReplicationImpl(Node node,
                       ReplicationClient client,
                       int replicationFactor,
                       java.lang.String instance,
                       ReplicationPolicy policy)
node - The node below this Replication implementationclient - The client for this ReplicationreplicationFactor - The replication factor for this instanceinstance - The unique instance name of this Replicationpolicy - DESCRIBE THE PARAMETER| Method Detail | 
protected IdRange getTotalRange()
public void replicate()
replicate in interface Replicationpublic boolean forward(RouteMessage message)
forward in interface Applicationmessage - The message being sent, containing an internal message along
      with a destination key and nodeHandle next hop.
public void deliver(Id id,
                    Message message)
deliver in interface Applicationid - The destination id of the messagemessage - The message being sent
public void update(NodeHandle handle,
                   boolean joined)
update in interface Applicationhandle - The handle that has joined/leftjoined - Whether the node has joined or left
public static IdSet merge(IdFactory factory,
                          IdSet a,
                          IdSet b)
a - The first setb - The second setfactory - DESCRIBE THE PARAMETER
  | 
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||