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 creatingCacheInvalidator
s 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 void
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
publishSequenceSnapshot()
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
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)
-
-