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<org.wildfly.clustering.cache.Key<I>>, org.wildfly.clustering.function.Supplier<I>, org.wildfly.clustering.server.manager.IdentifierFactoryService<I>, org.wildfly.clustering.server.service.Service

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

    Fields inherited from interface org.wildfly.clustering.function.Supplier

    NULL
  • Constructor Summary

    Constructors
    Constructor
    Description
    AffinityIdentifierFactoryService(Supplier<I> factory, org.infinispan.Cache<? extends org.wildfly.clustering.cache.Key<I>, ?> cache)
    Creates an affinity identifier factory service.
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
     
    org.wildfly.clustering.cache.Key<I>
     
    boolean
     
    void
     
    void
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.wildfly.clustering.function.Supplier

    handle, thenAccept, thenApply, thenApplyAsDouble, thenApplyAsInt, thenApplyAsLong, thenTest
  • Constructor Details

    • AffinityIdentifierFactoryService

      public AffinityIdentifierFactoryService(Supplier<I> factory, org.infinispan.Cache<? extends org.wildfly.clustering.cache.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 org.wildfly.clustering.cache.Key<I> getKey()
      Specified by:
      getKey in interface org.infinispan.affinity.KeyGenerator<I>
    • isStarted

      public boolean isStarted()
      Specified by:
      isStarted in interface org.wildfly.clustering.server.service.Service
    • start

      public void start()
      Specified by:
      start in interface org.wildfly.clustering.server.service.Service
    • stop

      public void stop()
      Specified by:
      stop in interface org.wildfly.clustering.server.service.Service