Class HashConfiguration

    • Field Detail

      • CONSISTENT_HASH_FACTORY

        public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<ConsistentHashFactory> CONSISTENT_HASH_FACTORY
      • NUM_OWNERS

        public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Integer> NUM_OWNERS
      • NUM_SEGMENTS

        public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Integer> NUM_SEGMENTS
      • CAPACITY_FACTOR

        public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Float> CAPACITY_FACTOR
      • KEY_PARTITIONER

        public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<KeyPartitioner> KEY_PARTITIONER
      • ELEMENT_DEFINITION

        public static final org.infinispan.commons.configuration.elements.ElementDefinition ELEMENT_DEFINITION
    • Method Detail

      • consistentHashFactory

        @Deprecated
        public ConsistentHashFactory<?> consistentHashFactory()
        Deprecated.
        Since 11.0. Will be removed in 14.0, the segment allocation will no longer be customizable.
        The consistent hash factory in use.
      • numOwners

        public int numOwners()
        Number of cluster-wide replicas for each cache entry.
      • numSegments

        public int numSegments()
        Controls the total number of hash space segments (per cluster).

        A hash space segment is the granularity for key distribution in the cluster: a node can own (or primary-own) one or more full segments, but not a fraction of a segment. As such, very small numSegments values (< 10 segments per node) will make the distribution of keys between nodes more uneven.

        The recommended value is 20 * the expected cluster size.

        Note: The value returned by ConsistentHash.getNumSegments() may be different, e.g. rounded up to a power of 2.

      • capacityFactor

        public float capacityFactor()
        Controls the proportion of entries that will reside on the local node, compared to the other nodes in the cluster. This is just a suggestion, there is no guarantee that a node with a capacity factor of 2 will have twice as many entries as a node with a capacity factor of 1.
      • groups

        public GroupsConfiguration groups()
        Configuration for various grouper definitions. See the user guide for more information.
      • attributes

        public org.infinispan.commons.configuration.attributes.AttributeSet attributes()
        Specified by:
        attributes in interface BaseConfigurationInfo
        Returns:
        the AttributeSet declared by the configuration.
      • getElementDefinition

        public org.infinispan.commons.configuration.elements.ElementDefinition getElementDefinition()
        Specified by:
        getElementDefinition in interface BaseConfigurationInfo
        Returns:
        the ElementDefinition of the configuration.
      • toString

        public String toString()
      • equals

        public boolean equals​(Object obj)
      • hashCode

        public int hashCode()