ePOST API

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

java.lang.Object
  extended by rice.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

Version:
$Id: ReplicationManagerRegrTest.java 3040 2006-02-07 12:57:36Z jeffh $
Author:
amislove

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 locally by the client.
 void existsInOverlay(Id id, Continuation command)
          This upcall should return whether or not the given id is currently stored somewhere in the overlay by the client.
 void fetch(Id id, NodeHandle hint, 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 reInsert(Id id, Continuation command)
          Asks a client to reinsert an object it already holds into the overlay
 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,
                  NodeHandle hint,
                  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
hint - A hint where to find the key from. This is where the local node heard about the key.
command - The command to return the result to

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 locally by the client.

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

existsInOverlay

public void existsInOverlay(Id id,
                            Continuation command)
Description copied from interface: ReplicationManagerClient
This upcall should return whether or not the given id is currently stored somewhere in the overlay by the client.

Specified by:
existsInOverlay in interface ReplicationManagerClient
Parameters:
id - The id in question

reInsert

public void reInsert(Id id,
                     Continuation command)
Description copied from interface: ReplicationManagerClient
Asks a client to reinsert an object it already holds into the overlay

Specified by:
reInsert in interface ReplicationManagerClient
Parameters:
id - The id in question

ePOST API

Copyright © 2001-2005 - Rice Pastry.