Class CacheInvalidatorFactory
- java.lang.Object
-
- com.atlassian.cache.hazelcast.asyncinvalidation.CacheInvalidatorFactory
-
- All Implemented Interfaces:
AutoCloseable
public final class CacheInvalidatorFactory extends Object implements AutoCloseable
Responsible for creatingCacheInvalidators for a givenCache, as well managing the sequence snapshot process.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()CLoses all resources maintained by this object, including deregistration of all topic listeners.static CacheInvalidatorFactorycreate(com.hazelcast.core.HazelcastInstance hazelcast, Function<String,String> topicNamePrefixer, Observability observability)<K extends Serializable>
CacheInvalidator<K>createCacheInvalidator(com.atlassian.cache.Cache<K,?> cache, com.atlassian.cache.ManagedCache managedCache)Creates aCacheInvalidatorfor the givenCache.<K extends Serializable,V>
CacheReplicator<K,V>createCacheReplicator(com.atlassian.cache.Cache<K,V> localCache)voidpublishSequenceSnapshot()Builds a snapshot of the current invalidation sequence numbers for every cache, and publishes them to the other nodes.
-
-
-
Method Detail
-
create
public static CacheInvalidatorFactory create(com.hazelcast.core.HazelcastInstance hazelcast, Function<String,String> topicNamePrefixer, Observability observability)
- Returns:
- a new
CacheInvalidatorFactoryfor the givenHazelcastInstance.
-
close
public void close()
CLoses all resources maintained by this object, including deregistration of all topic listeners.- Specified by:
closein interfaceAutoCloseable
-
publishSequenceSnapshot
public void publishSequenceSnapshot()
Builds a snapshot of the current invalidation sequence numbers for every cache, and publishes them to the other nodes.
-
createCacheInvalidator
public <K extends Serializable> CacheInvalidator<K> createCacheInvalidator(com.atlassian.cache.Cache<K,?> cache, com.atlassian.cache.ManagedCache managedCache)
Creates aCacheInvalidatorfor the givenCache.
-
createCacheReplicator
public <K extends Serializable,V> CacheReplicator<K,V> createCacheReplicator(com.atlassian.cache.Cache<K,V> localCache)
-
-