org.infinispan.distribution
Class ConsistentHashHelper
java.lang.Object
org.infinispan.distribution.ConsistentHashHelper
public class ConsistentHashHelper
- extends Object
// TODO: Manik: Document this
- Since:
- 4.0
- Author:
- Manik Surtani
Method Summary |
static ConsistentHash |
createConsistentHash(Class<? extends ConsistentHash> clazz,
List<Address> addresses)
|
static ConsistentHash |
createConsistentHash(Class<? extends ConsistentHash> clazz,
List<Address> addresses,
Address... moreAddresses)
|
static ConsistentHash |
createConsistentHash(Class<? extends ConsistentHash> clazz,
List<Address> addresses,
Collection<Address> moreAddresses)
|
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 |
ConsistentHashHelper
public ConsistentHashHelper()
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 withtoRemove
- address to removec
- 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
createConsistentHash
public static ConsistentHash createConsistentHash(Class<? extends ConsistentHash> clazz,
List<Address> addresses)
throws IllegalAccessException,
InstantiationException,
ClassNotFoundException
- Throws:
IllegalAccessException
InstantiationException
ClassNotFoundException
createConsistentHash
public static ConsistentHash createConsistentHash(Class<? extends ConsistentHash> clazz,
List<Address> addresses,
Address... moreAddresses)
throws IllegalAccessException,
ClassNotFoundException,
InstantiationException
- Throws:
IllegalAccessException
ClassNotFoundException
InstantiationException
createConsistentHash
public static ConsistentHash createConsistentHash(Class<? extends ConsistentHash> clazz,
List<Address> addresses,
Collection<Address> moreAddresses)
throws IllegalAccessException,
ClassNotFoundException,
InstantiationException
- Throws:
IllegalAccessException
ClassNotFoundException
InstantiationException
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.