Class AffinityIdentifierFactory<I>

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

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

    • AffinityIdentifierFactory

      public AffinityIdentifierFactory(Supplier<I> factory, org.infinispan.Cache<? extends Key<I>,?> cache)
  • 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