|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrice.p2p.replication.ReplicationImpl
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.util.logging.Logger |
log
the logger which we will use |
static int |
MAINTENANCE_INTERVAL
The amount of time to wait between replications |
protected int |
replicationFactor
The replication factor for this replication |
Constructor Summary | |
ReplicationImpl(Node node,
ReplicationClient client,
int replicationFactor,
java.lang.String instance)
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 |
void |
sendRequests()
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 |
public static int MAINTENANCE_INTERVAL
protected Endpoint endpoint
protected java.util.logging.Logger log
protected NodeHandle handle
protected IdFactory factory
protected ReplicationClient client
protected int replicationFactor
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 ReplicationMethod Detail |
protected IdRange getTotalRange()
public void sendRequests()
public boolean forward(RouteMessage message)
forward
in interface Application
message
- 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 Application
id
- The destination id of the messagemessage
- The message being sentpublic void update(NodeHandle handle, boolean joined)
update
in interface Application
handle
- The handle that has joined/leftjoined
- Whether the node has joined or left
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |