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

org.infinispan.topology.PersistentUUIDManager Maven / Gradle / Ivy

There is a newer version: 15.1.0.Dev04
Show newest version
package org.infinispan.topology;

import java.util.List;
import java.util.function.UnaryOperator;

import org.infinispan.factories.scopes.Scope;
import org.infinispan.factories.scopes.Scopes;
import org.infinispan.remoting.transport.Address;

/**
 * PersistentUUIDManager maintains a mapping of {@link PersistentUUID}s present in the cluster
 *
 * @author Tristan Tarrant
 * @since 9.0
 */
@Scope(Scopes.GLOBAL)
public interface PersistentUUIDManager {
   /**
    * Adds a mapping between an {@link Address} and a {@link PersistentUUID}
    * @param address
    * @param persistentUUID
    */
   void addPersistentAddressMapping(Address address, PersistentUUID persistentUUID);

   /**
    * Retrieves the {@link PersistentUUID} of a node given its {@link Address}
    * @param address the address to lookup
    * @return the persistentuuid of the node, null if no mapping is present
    */
   PersistentUUID getPersistentUuid(Address address);

   /**
    * Retrieves the {@link Address} of a node given its {@link PersistentUUID}
    * @param persistentUUID the persistent uuid to lookup
    * @return the address of the node, null if no mapping is present
    */
   Address getAddress(PersistentUUID persistentUUID);

   /**
    * Removes any address mapping for the specified {@link PersistentUUID}
    * @param persistentUUID the {@link PersistentUUID} for which to remove mappings
    */
   void removePersistentAddressMapping(PersistentUUID persistentUUID);

   /**
    * Removes any address mapping for the specified {@link Address}
    * @param address the {@link Address} for which to remove mappings
    */
   void removePersistentAddressMapping(Address address);

   /**
    * Returns a list of {@link PersistentUUID}s for the supplied {@link Address}es
    * @param addresses
    * @return
    */
   List mapAddresses(List
addresses); /** * Provides a remapping operator which translates addresses to persistentuuids */ UnaryOperator
addressToPersistentUUID(); /** * Provides a remapping operator which translates persistentuuids to addresses */ UnaryOperator
persistentUUIDToAddress(); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy