org.infinispan.config
Class Configuration.HashType

java.lang.Object
  extended by org.infinispan.config.AbstractConfigurationBean
      extended by org.infinispan.config.AbstractNamedCacheConfigurationBean
          extended by org.infinispan.config.Configuration.HashType
All Implemented Interfaces:
Serializable, Cloneable, CloneableConfigurationComponent, Configuration.HashConfig, JAXBUnmarshallable
Enclosing class:
Configuration

public static class Configuration.HashType
extends AbstractNamedCacheConfigurationBean
implements Configuration.HashConfig

Allows fine-tuning of rehashing characteristics. Only used with 'distributed' cache mode, and otherwise ignored.

See Also:
Configuration reference, Serialized Form

Field Summary
protected  String consistentHashClass
           
protected  String hashFunctionClass
           
protected  Integer numOwners
           
protected  Boolean rehashEnabled
           
protected  Long rehashRpcTimeout
           
protected  Long rehashWait
           
 
Fields inherited from class org.infinispan.config.AbstractNamedCacheConfigurationBean
cr
 
Fields inherited from class org.infinispan.config.AbstractConfigurationBean
EMPTY_PROPERTIES, log, overriddenConfigurationElements
 
Constructor Summary
Configuration.HashType()
           
 
Method Summary
 void accept(ConfigurationBeanVisitor v)
           
 Configuration.HashConfig consistentHashClass(String consistentHashClass)
          Fully qualified name of class providing consistent hash algorithm
 boolean equals(Object o)
           
 int hashCode()
           
 Configuration.HashConfig hashFunctionClass(String hashFunctionClass)
          A fully qualified name of the class providing a hash function, used as a bit spreader and a general hash code generator.
 Configuration.HashConfig numOwners(Integer numOwners)
          Number of cluster-wide replicas for each cache entry.
 Configuration.HashConfig rehashEnabled(Boolean rehashEnabled)
          If false, no rebalancing or rehashing will take place when a new node joins the cluster or a node leaves
 Configuration.HashConfig rehashRpcTimeout(Long rehashRpcTimeout)
          Rehashing timeout
 Configuration.HashConfig rehashWait(Long rehashWaitTime)
           
 void setConsistentHashClass(String consistentHashClass)
           
 void setHashFunctionClass(String hashFunctionClass)
           
 void setNumOwners(Integer numOwners)
           
 void setRehashEnabled(Boolean rehashEnabled)
           
 void setRehashRpcTimeout(Long rehashRpcTimeout)
           
 void setRehashWait(Long rehashWaitTime)
           
 
Methods inherited from class org.infinispan.config.AbstractNamedCacheConfigurationBean
clone, hasComponentStarted, inject
 
Methods inherited from class org.infinispan.config.AbstractConfigurationBean
testImmutability, toTypedProperties, toTypedProperties, uc, willUnmarshall
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

consistentHashClass

protected String consistentHashClass

hashFunctionClass

protected String hashFunctionClass

numOwners

protected Integer numOwners

rehashWait

protected Long rehashWait

rehashRpcTimeout

protected Long rehashRpcTimeout

rehashEnabled

protected Boolean rehashEnabled
Constructor Detail

Configuration.HashType

public Configuration.HashType()
Method Detail

setConsistentHashClass

public void setConsistentHashClass(String consistentHashClass)

setHashFunctionClass

public void setHashFunctionClass(String hashFunctionClass)

consistentHashClass

public Configuration.HashConfig consistentHashClass(String consistentHashClass)
Description copied from interface: Configuration.HashConfig
Fully qualified name of class providing consistent hash algorithm

Specified by:
consistentHashClass in interface Configuration.HashConfig

hashFunctionClass

public Configuration.HashConfig hashFunctionClass(String hashFunctionClass)
Description copied from interface: Configuration.HashConfig
A fully qualified name of the class providing a hash function, used as a bit spreader and a general hash code generator. Typically used in conjunction with the many default ConsistentHash implementations shipped.

Specified by:
hashFunctionClass in interface Configuration.HashConfig

accept

public void accept(ConfigurationBeanVisitor v)

setNumOwners

public void setNumOwners(Integer numOwners)

setRehashWait

public void setRehashWait(Long rehashWaitTime)

setRehashRpcTimeout

public void setRehashRpcTimeout(Long rehashRpcTimeout)

setRehashEnabled

public void setRehashEnabled(Boolean rehashEnabled)

numOwners

public Configuration.HashConfig numOwners(Integer numOwners)
Description copied from interface: Configuration.HashConfig
Number of cluster-wide replicas for each cache entry.

Specified by:
numOwners in interface Configuration.HashConfig

rehashWait

public Configuration.HashConfig rehashWait(Long rehashWaitTime)
Specified by:
rehashWait in interface Configuration.HashConfig

rehashRpcTimeout

public Configuration.HashConfig rehashRpcTimeout(Long rehashRpcTimeout)
Description copied from interface: Configuration.HashConfig
Rehashing timeout

Specified by:
rehashRpcTimeout in interface Configuration.HashConfig

rehashEnabled

public Configuration.HashConfig rehashEnabled(Boolean rehashEnabled)
Description copied from interface: Configuration.HashConfig
If false, no rebalancing or rehashing will take place when a new node joins the cluster or a node leaves

Specified by:
rehashEnabled in interface Configuration.HashConfig

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


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