rice.p2p.replication.manager.testing
Class ReplicationManagerRegrTest.TestReplicationManagerClient

java.lang.Object
  extended byrice.p2p.replication.manager.testing.ReplicationManagerRegrTest.TestReplicationManagerClient
All Implemented Interfaces:
ReplicationManagerClient
Enclosing class:
ReplicationManagerRegrTest

protected class ReplicationManagerRegrTest.TestReplicationManagerClient
extends java.lang.Object
implements ReplicationManagerClient

DESCRIBE THE CLASS


Field Summary
 Node node
           
 IdSet set
           
 
Constructor Summary
ReplicationManagerRegrTest.TestReplicationManagerClient(Node node)
           
 
Method Summary
 boolean exists(Id id)
          This upcall should return whether or not the given id is currently stored by the client.
 void fetch(Id id, Continuation command)
          This upcall is invoked to tell the client to fetch the given id, and to call the given command with the boolean result once the fetch is completed.
 void insert(Id id)
           
 void remove(Id id, Continuation command)
          This upcall is to notify the client that the given id can be safely removed from the storage.
 IdSet scan(IdRange range)
          This upcall should return the set of keys that the application currently stores in this range.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

node

public Node node

set

public IdSet set
Constructor Detail

ReplicationManagerRegrTest.TestReplicationManagerClient

public ReplicationManagerRegrTest.TestReplicationManagerClient(Node node)
Method Detail

fetch

public void fetch(Id id,
                  Continuation command)
Description copied from interface: ReplicationManagerClient
This upcall is invoked to tell the client to fetch the given id, and to call the given command with the boolean result once the fetch is completed. The client *MUST* call the command at some point in the future, as the manager waits for the command to return before continuing.

Specified by:
fetch in interface ReplicationManagerClient
Parameters:
id - The id to fetch

remove

public void remove(Id id,
                   Continuation command)
Description copied from interface: ReplicationManagerClient
This upcall is to notify the client that the given id can be safely removed from the storage. The client may choose to perform advanced behavior, such as caching the object, or may simply delete it.

Specified by:
remove in interface ReplicationManagerClient
Parameters:
id - The id to remove

scan

public IdSet scan(IdRange range)
Description copied from interface: ReplicationManagerClient
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.

Specified by:
scan in interface ReplicationManagerClient
Parameters:
range - the requested range

insert

public void insert(Id id)

exists

public boolean exists(Id id)
Description copied from interface: ReplicationManagerClient
This upcall should return whether or not the given id is currently stored by the client.

Specified by:
exists in interface ReplicationManagerClient
Parameters:
id - The id in question
Returns:
Whether or not the id exists





Imprint-Dataprotection