Class AsyncInvalidationCacheFactory
java.lang.Object
com.atlassian.confluence.cache.hazelcast.AsyncInvalidationCacheFactory
Responsible for creating
AsyncInvalidationCache
instances, as well as managing the scheduled publishing of
sequence snapshots and observability events from those caches.- Since:
- 7.5
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
-
Constructor Summary
ConstructorsConstructorDescriptionAsyncInvalidationCacheFactory
(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) -
Method Summary
Modifier and TypeMethodDescription<K,
V> com.atlassian.cache.Cache<K, V> createInvalidationCache
(String cacheName, com.atlassian.cache.CacheLoader loader, com.atlassian.cache.CacheSettings settings) Creates an instance ofAsyncInvalidationCache
, backed by the singleton instance ofCacheInvalidatorFactory
.<K,
V> com.atlassian.cache.Cache<K, V> createReplicatedCache
(String cacheName, com.atlassian.cache.CacheLoader loader, com.atlassian.cache.CacheSettings settings) Creates an instance ofAsyncReplicationCache
, backed by the singleton instance ofCacheInvalidatorFactory
.boolean
isReplicatedCacheSupported
(String cacheName) void
onStart
(ApplicationStartedEvent event) Registers a sequence snapshot to be published on a scheduled, if and only ifCacheInvalidatorFactory
has been initialised.
-
Constructor Details
-
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 Details
-
onStart
@EventListener public void onStart(ApplicationStartedEvent event) throws com.atlassian.scheduler.SchedulerServiceException Registers a sequence snapshot to be published on a scheduled, if and only ifCacheInvalidatorFactory
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 ofAsyncInvalidationCache
, backed by the singleton instance ofCacheInvalidatorFactory
. -
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 ofAsyncReplicationCache
, backed by the singleton instance ofCacheInvalidatorFactory
. -
isReplicatedCacheSupported
-