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 creating CacheInvalidators for a given Cache, as well managing the sequence snapshot process.
  • Method Details

    • create

      public static CacheInvalidatorFactory create(com.hazelcast.core.HazelcastInstance hazelcast, Function<String,String> topicNamePrefixer, Observability observability)
      Returns:
      a new CacheInvalidatorFactory for the given HazelcastInstance.
    • close

      public void close()
      CLoses all resources maintained by this object, including deregistration of all topic listeners.
      Specified by:
      close in interface AutoCloseable
    • 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 a CacheInvalidator for the given Cache.
    • createCacheReplicator

      public <K extends Serializable, V> CacheReplicator<K,V> createCacheReplicator(com.atlassian.cache.Cache<K,V> localCache)