Rice Pastry API

rice.p2p.replication
Interface ReplicationClient

All Known Implementing Classes:
ReplicationManagerImpl, ReplicationRegrTest.TestReplicationClient

public interface ReplicationClient

Version:
$Id: ReplicationClient.java 3524 2007-01-09 14:09:27Z jeffh $
Author:
Alan Mislove

Method Summary
 void fetch(IdSet keySet, NodeHandle hint)
          This upcall is invoked to notify the application that is should fetch the cooresponding keys in this set, since the node is now responsible for these keys also.
 IdSet scan(IdRange range)
          This upcall should return the set of keys that the application currently stores in this range.
 void setRange(IdRange range)
          This upcall is to notify the application of the range of keys for which it is responsible.
 

Method Detail

fetch

void fetch(IdSet keySet,
           NodeHandle hint)
This upcall is invoked to notify the application that is should fetch the cooresponding keys in this set, since the node is now responsible for these keys also.

Parameters:
keySet - set containing the keys that needs to be fetched
hint - A hint as to where to find the ids in the key set. This is where the local node heard about the keys from.

setRange

void setRange(IdRange range)
This upcall is to notify the application of the range of keys for which it is responsible. The application might choose to react to call by calling a scan(complement of this range) to the persistance manager and get the keys for which it is not responsible and call delete on the persistance manager for those objects.

Parameters:
range - the range of keys for which the local node is currently responsible

scan

IdSet scan(IdRange range)
This upcall should return the set of keys that the application currently stores in this range. Should return a empty IdSet (not null), in the case that no keys belong to this range.

Parameters:
range - the requested range

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection