All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.distribution.ch.KeyPartitioner Maven / Gradle / Ivy

There is a newer version: 9.1.7.Final
Show newest version
package org.infinispan.distribution.ch;

import org.infinispan.commons.hash.Hash;
import org.infinispan.configuration.cache.Configuration;
import org.infinispan.configuration.cache.HashConfiguration;
import org.infinispan.remoting.transport.Address;

import java.util.Collection;
import java.util.List;
import java.util.Set;

/**
 * Map keys to segments.
 *
 * @author Dan Berindei
 * @since 8.2
 */
public interface KeyPartitioner {
   /**
    * Initialization.
    *
    * 

The partitioner can also use injection to access other cache-level or global components. * This method will be called before any other injection methods.

* *

Does not need to be thread-safe (Infinispan safely publishes the instance after initialization).

* @param configuration */ default void init(HashConfiguration configuration) { // Do nothing } /** * Obtains the segment for a key. * * Must be thread-safe. */ int getSegment(Object key); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy