Class CacheRegistry<K,V>
java.lang.Object
org.wildfly.clustering.server.infinispan.registry.CacheRegistry<K,V>
- Type Parameters:
K- key typeV- value type
- All Implemented Interfaces:
AutoCloseable, CacheContainerRegistry<K,V>, Registrar<RegistryListener<K, V>>, Registry<CacheContainerGroupMember, K, V>
Clustered
Registry backed by an Infinispan cache.- Author:
- Paul Ferraro
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe configuration of this registry. -
Constructor Summary
ConstructorsConstructorDescriptionCacheRegistry(CacheRegistry.Configuration<K, V> configuration) Creates a cache registry using the specified configuration. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()event(org.infinispan.notifications.cachelistener.event.CacheEntryEvent<org.infinispan.remoting.transport.Address, Map.Entry<K, V>> event) Non-blocking handler of cache entry creation/modified events.Returns all registry entries in this group.getEntry(CacheContainerGroupMember member) Returns the registry entry for the specified group member.getGroup()Returns the group associated with this factory.register(RegistryListener<K, V> listener) Registers an object.removed(org.infinispan.notifications.cachelistener.event.CacheEntryRemovedEvent<org.infinispan.remoting.transport.Address, Map.Entry<K, V>> event) Non-blocking handler of cache entry removal events.topologyChanged(org.infinispan.notifications.cachelistener.event.TopologyChangedEvent<org.infinispan.remoting.transport.Address, Map.Entry<K, V>> event) Non-blocking handler of topology changed events.
-
Constructor Details
-
CacheRegistry
Creates a cache registry using the specified configuration.- Parameters:
configuration- the configuration of this registry.
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceRegistry<CacheContainerGroupMember, K, V>
-
register
Description copied from interface:RegistrarRegisters an object. The object is unregistered when the generatedRegistrationis closed. -
getGroup
Description copied from interface:RegistryReturns the group associated with this factory.- Specified by:
getGroupin interfaceCacheContainerRegistry<K,V> - Specified by:
getGroupin interfaceRegistry<CacheContainerGroupMember, K, V>- Returns:
- a group
-
getEntries
Description copied from interface:RegistryReturns all registry entries in this group.- Specified by:
getEntriesin interfaceRegistry<CacheContainerGroupMember, K, V>- Returns:
- a map for entries
-
getEntry
-
topologyChanged
public CompletionStage<Void> topologyChanged(org.infinispan.notifications.cachelistener.event.TopologyChangedEvent<org.infinispan.remoting.transport.Address, Map.Entry<K, V>> event) Non-blocking handler of topology changed events.- Parameters:
event- a topology changed event.- Returns:
- a completion stage
-
event
public CompletionStage<Void> event(org.infinispan.notifications.cachelistener.event.CacheEntryEvent<org.infinispan.remoting.transport.Address, Map.Entry<K, V>> event) Non-blocking handler of cache entry creation/modified events.- Parameters:
event- a cache entry event.- Returns:
- a completion stage
-
removed
public CompletionStage<Void> removed(org.infinispan.notifications.cachelistener.event.CacheEntryRemovedEvent<org.infinispan.remoting.transport.Address, Map.Entry<K, V>> event) Non-blocking handler of cache entry removal events.- Parameters:
event- a cache entry removal event.- Returns:
- a completion stage
-