Class CacheServiceProviderRegistrar<T>

java.lang.Object
org.wildfly.clustering.server.infinispan.provider.CacheServiceProviderRegistrar<T>
Type Parameters:
T - the service identifier type
All Implemented Interfaces:
AutoCloseable, CacheContainerServiceProviderRegistrar<T>, org.wildfly.clustering.server.provider.ServiceProviderRegistrar<T, CacheContainerGroupMember>, org.wildfly.clustering.server.provider.ServiceProviderRegistry<T, CacheContainerGroupMember>, org.wildfly.clustering.server.Registrar<T>

public class CacheServiceProviderRegistrar<T> extends Object implements CacheContainerServiceProviderRegistrar<T>, AutoCloseable
Infinispan Cache based ServiceProviderRegistrar. This factory can create multiple ServiceProviderRegistration instances, all of which share the same Cache instance.
Author:
Paul Ferraro
  • Constructor Details

    • CacheServiceProviderRegistrar

      public CacheServiceProviderRegistrar(CacheServiceProviderRegistrar.Configuration configuration)
      Creates a service provider registrar using the specified configuration
      Parameters:
      configuration - a service provider registrar configuration
  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • getGroup

      public CacheContainerGroup getGroup()
      Specified by:
      getGroup in interface CacheContainerServiceProviderRegistrar<T>
      Specified by:
      getGroup in interface org.wildfly.clustering.server.provider.ServiceProviderRegistry<T, CacheContainerGroupMember>
    • register

      public org.wildfly.clustering.server.provider.ServiceProviderRegistration<T, CacheContainerGroupMember> register(T service)
      Specified by:
      register in interface org.wildfly.clustering.server.Registrar<T>
      Specified by:
      register in interface org.wildfly.clustering.server.provider.ServiceProviderRegistrar<T, CacheContainerGroupMember>
    • register

      public org.wildfly.clustering.server.provider.ServiceProviderRegistration<T, CacheContainerGroupMember> register(T service, org.wildfly.clustering.server.provider.ServiceProviderRegistrationListener<CacheContainerGroupMember> listener)
      Specified by:
      register in interface org.wildfly.clustering.server.provider.ServiceProviderRegistrar<T, CacheContainerGroupMember>
    • getProviders

      public Set<CacheContainerGroupMember> getProviders(T service)
      Specified by:
      getProviders in interface org.wildfly.clustering.server.provider.ServiceProviderRegistry<T, CacheContainerGroupMember>
    • getServices

      public Set<T> getServices()
      Specified by:
      getServices in interface org.wildfly.clustering.server.provider.ServiceProviderRegistry<T, CacheContainerGroupMember>
    • topologyChanged

      public CompletionStage<Void> topologyChanged(org.infinispan.notifications.cachelistener.event.TopologyChangedEvent<T, Set<org.infinispan.remoting.transport.Address>> event)
      Non-blocking handler of topology changed events.
      Parameters:
      event - a topology changed event
      Returns:
      a completion stage
    • created

      public CompletionStage<Void> created(org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEvent<T, Set<org.infinispan.remoting.transport.Address>> event)
      Non-blocking handler of cache entry creation events.
      Parameters:
      event - a cache entry creation event
      Returns:
      a completion stage
    • modified

      public CompletionStage<Void> modified(org.infinispan.notifications.cachelistener.event.CacheEntryModifiedEvent<T, Set<org.infinispan.remoting.transport.Address>> event)
      Non-blocking handler of cache entry modified events.
      Parameters:
      event - a cache entry modified event
      Returns:
      a completion stage