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)
        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
      • createCache

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