Class AsyncInvalidationCacheFactory


  • @Internal
    public final class AsyncInvalidationCacheFactory
    extends Object
    Responsible for creating AsyncInvalidationCache instances, as well as managing the scheduled publishing of sequence snapshots and observability events from those caches.
    Since:
    7.5
    • Constructor Detail

      • AsyncInvalidationCacheFactory

        public AsyncInvalidationCacheFactory​(com.hazelcast.core.HazelcastInstance hazelcastInstance,
                                             com.atlassian.event.api.EventPublisher eventPublisher,
                                             com.atlassian.scheduler.SchedulerService schedulerService,
                                             com.atlassian.cache.CacheFactory localCacheFactory,
                                             io.micrometer.core.instrument.MeterRegistry micrometer,
                                             DarkFeaturesManager darkFeaturesManager)
        Since:
        7.6
    • Method Detail

      • onTenantArrived

        @EventListener
        public void onTenantArrived​(com.atlassian.tenancy.api.event.TenantArrivedEvent event)
                             throws com.atlassian.scheduler.SchedulerServiceException
        Registers a sequence snapshot to be published on a scheduled, if and only if CacheInvalidatorFactory has been initialised.
        Throws:
        com.atlassian.scheduler.SchedulerServiceException
      • createInvalidationCache

        public <K,​V> com.atlassian.cache.Cache<K,​V> createInvalidationCache​(String cacheName,
                                                                                        com.atlassian.cache.CacheLoader loader,
                                                                                        com.atlassian.cache.CacheSettings settings)
        Creates an instance of AsyncInvalidationCache, backed by the singleton instance of CacheInvalidatorFactory.
      • createReplicatedCache

        public <K,​V> com.atlassian.cache.Cache<K,​V> createReplicatedCache​(String cacheName,
                                                                                      com.atlassian.cache.CacheLoader loader,
                                                                                      com.atlassian.cache.CacheSettings settings)
        Creates an instance of AsyncReplicationCache, backed by the singleton instance of CacheInvalidatorFactory.
      • isReplicatedCacheSupported

        public boolean isReplicatedCacheSupported​(String cacheName)