org.infinispan.distribution
Class ConsistentHashHelper

java.lang.Object
  extended by org.infinispan.distribution.ConsistentHashHelper

public class ConsistentHashHelper
extends Object

// TODO: Manik: Document this

Since:
4.0
Author:
Manik Surtani

Constructor Summary
ConsistentHashHelper()
           
 
Method Summary
static ConsistentHash createConsistentHash(Configuration c, List<Address> addresses)
           
static ConsistentHash createConsistentHash(Configuration c, List<Address> addresses, Address... moreAddresses)
           
static ConsistentHash createConsistentHash(Configuration c, List<Address> addresses, Collection<Address> moreAddresses)
           
static ConsistentHash removeAddress(ConsistentHash ch, Address toRemove, Configuration c)
          Returns a new consistent hash of the same type with the given address removed.
static UnionConsistentHash removeAddressFromUnionConsistentHash(UnionConsistentHash uch, Address toRemove, Configuration c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsistentHashHelper

public ConsistentHashHelper()
Method Detail

removeAddress

public static ConsistentHash removeAddress(ConsistentHash ch,
                                           Address toRemove,
                                           Configuration c)
                                    throws IllegalAccessException,
                                           InstantiationException,
                                           ClassNotFoundException
Returns a new consistent hash of the same type with the given address removed.

Parameters:
ch - consistent hash to start with
toRemove - address to remove
c - configuration
Returns:
a new consistent hash instance of the same type
Throws:
IllegalAccessException
InstantiationException
ClassNotFoundException

removeAddressFromUnionConsistentHash

public static UnionConsistentHash removeAddressFromUnionConsistentHash(UnionConsistentHash uch,
                                                                       Address toRemove,
                                                                       Configuration c)
                                                                throws IllegalAccessException,
                                                                       ClassNotFoundException,
                                                                       InstantiationException
Throws:
IllegalAccessException
ClassNotFoundException
InstantiationException

createConsistentHash

public static ConsistentHash createConsistentHash(Configuration c,
                                                  List<Address> addresses)
                                           throws IllegalAccessException,
                                                  InstantiationException,
                                                  ClassNotFoundException
Throws:
IllegalAccessException
InstantiationException
ClassNotFoundException

createConsistentHash

public static ConsistentHash createConsistentHash(Configuration c,
                                                  List<Address> addresses,
                                                  Address... moreAddresses)
                                           throws IllegalAccessException,
                                                  ClassNotFoundException,
                                                  InstantiationException
Throws:
IllegalAccessException
ClassNotFoundException
InstantiationException

createConsistentHash

public static ConsistentHash createConsistentHash(Configuration c,
                                                  List<Address> addresses,
                                                  Collection<Address> moreAddresses)
                                           throws IllegalAccessException,
                                                  ClassNotFoundException,
                                                  InstantiationException
Throws:
IllegalAccessException
ClassNotFoundException
InstantiationException

Google Analytics

Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.