org.sapia.ubik.rmi.replication
Class ReplicationStrategy

java.lang.Object
  extended by org.sapia.ubik.rmi.replication.ReplicationStrategy

public class ReplicationStrategy
extends java.lang.Object

This class implements the logic that selects the next server to which a replicated command should be dispatched.

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2004 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site

Constructor Summary
ReplicationStrategy(java.util.Set visited, java.util.Set targets, java.util.Set existing)
           
 
Method Summary
 ServerAddress selectNextSibling()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplicationStrategy

public ReplicationStrategy(java.util.Set visited,
                           java.util.Set targets,
                           java.util.Set existing)
Parameters:
visited - the Set of ServerAddresses of the hosts that have already been visited.
targets - the Set of ServerAddresses corresponding to targeted hosts - if null, then the strategy assumes that all hosts must be visited.
existing - the Set of ServerAddresses corresponding to the existing hosts.
Method Detail

selectNextSibling

public ServerAddress selectNextSibling()
Returns:
the ServerAddress of the next sibling host to which replication should be made. null is returned if there is no "next" host to which to replicate - all hosts have been visited. Note: if not null, the returned address is added to the set of visited ones.


Copyright © 2010 Sapia OSS. All Rights Reserved.