Class AffinityIdentifierFactoryService<I>

java.lang.Object
org.wildfly.clustering.server.infinispan.manager.AffinityIdentifierFactoryService<I>
Type Parameters:
I - the identifier type
All Implemented Interfaces:
Supplier<I>, org.infinispan.affinity.KeyGenerator<Key<I>>, Supplier<I>, IdentifierFactoryService<I>, Service

public class AffinityIdentifierFactoryService<I> extends Object implements IdentifierFactoryService<I>, org.infinispan.affinity.KeyGenerator<Key<I>>
An IdentifierFactoryService that uses a KeyAffinityService to pre-generate locally hashing identifiers from a supplier.
Author:
Paul Ferraro
  • Constructor Details

    • AffinityIdentifierFactoryService

      public AffinityIdentifierFactoryService(Supplier<I> factory, org.infinispan.Cache<? extends Key<I>, ?> cache)
      Creates an affinity identifier factory service.
      Parameters:
      factory - the decorated identifier factory
      cache - the cache of the associated key affinity service.
  • Method Details

    • get

      public I get()
      Specified by:
      get in interface Supplier<I>
    • getKey

      public Key<I> getKey()
      Specified by:
      getKey in interface org.infinispan.affinity.KeyGenerator<I>
    • isStarted

      public boolean isStarted()
      Description copied from interface: Service
      Indicates whether or not this service is started.
      Specified by:
      isStarted in interface Service
      Returns:
      true, if this service is started, false otherwise
    • start

      public void start()
      Description copied from interface: Service
      Starts this service.
      Specified by:
      start in interface Service
    • stop

      public void stop()
      Description copied from interface: Service
      Stops this service.
      Specified by:
      stop in interface Service