Class AsyncInvalidationCacheFactory
- java.lang.Object
-
- com.atlassian.confluence.cache.hazelcast.AsyncInvalidationCacheFactory
-
@Internal public final class AsyncInvalidationCacheFactory extends Object
Responsible for creatingAsyncInvalidationCache
instances, as well as managing the scheduled publishing of sequence snapshots and observability events from those caches.- Since:
- 7.5
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AsyncInvalidationCacheFactory.CacheInvalidationOutOfSequenceEvent
static class
AsyncInvalidationCacheFactory.CacheSequenceSnapshotInconsistentEvent
-
Constructor Summary
Constructors Constructor Description 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <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
onTenantArrived(com.atlassian.tenancy.api.event.TenantArrivedEvent event)
Registers a sequence snapshot to be published on a scheduled, if and only ifCacheInvalidatorFactory
has been initialised.
-
-
-
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 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
public boolean isReplicatedCacheSupported(String cacheName)
-
-