Rice Pastry API

rice.p2p.replication
Class ReplicationPolicy.DefaultReplicationPolicy

java.lang.Object
  extended byrice.p2p.replication.ReplicationPolicy.DefaultReplicationPolicy
All Implemented Interfaces:
ReplicationPolicy
Enclosing class:
ReplicationPolicy

public static class ReplicationPolicy.DefaultReplicationPolicy
extends java.lang.Object
implements ReplicationPolicy

The default policy for Replication, which simply does a direct diff between the sets

Version:
$Id: pretty.settings 2305 2005-03-11 20:22:33Z jeffh $
Author:
Alan Mislove

Nested Class Summary
 
Nested classes inherited from class rice.p2p.replication.ReplicationPolicy
ReplicationPolicy.DefaultReplicationPolicy
 
Constructor Summary
ReplicationPolicy.DefaultReplicationPolicy()
           
 
Method Summary
 IdSet difference(IdSet local, IdSet remote, IdFactory factory)
          This method simply returns remote-local.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplicationPolicy.DefaultReplicationPolicy

public ReplicationPolicy.DefaultReplicationPolicy()
Method Detail

difference

public IdSet difference(IdSet local,
                        IdSet remote,
                        IdFactory factory)
This method simply returns remote-local.

Specified by:
difference in interface ReplicationPolicy
Parameters:
local - The set of local ids
remote - The set of remote ids
factory - The factory to use to create IdSets
Returns:
A subset of the remote ids which need to be fetched

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection