Class CacheInvalidatorFactory
java.lang.Object
com.atlassian.cache.hazelcast.asyncinvalidation.CacheInvalidatorFactory
- All Implemented Interfaces:
AutoCloseable
Responsible for creating
CacheInvalidators for a given Cache, as well managing the sequence snapshot process.-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()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) voidBuilds a snapshot of the current invalidation sequence numbers for every cache, and publishes them to the other nodes.
-
Method Details
-
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)
-