Class CacheInvalidatorFactory
java.lang.Object
com.atlassian.cache.hazelcast.asyncinvalidation.CacheInvalidatorFactory
- All Implemented Interfaces:
AutoCloseable
Responsible for creating
CacheInvalidator
s for a given Cache
, as well managing the sequence snapshot process.-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
CLoses all resources maintained by this object, including deregistration of all topic listeners.static CacheInvalidatorFactory
create
(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 aCacheInvalidator
for the givenCache
.<K extends Serializable,
V>
CacheReplicator<K,V> createCacheReplicator
(com.atlassian.cache.Cache<K, V> localCache) void
Builds 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
CacheInvalidatorFactory
for the givenHazelcastInstance
.
-
close
public void close()CLoses all resources maintained by this object, including deregistration of all topic listeners.- Specified by:
close
in 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 aCacheInvalidator
for the givenCache
. -
createCacheReplicator
public <K extends Serializable,V> CacheReplicator<K,V> createCacheReplicator(com.atlassian.cache.Cache<K, V> localCache)
-