@Internal public class HibernateClusterAwareCacheManager extends Object implements com.atlassian.cache.CacheManager, org.springframework.beans.factory.InitializingBean
CacheManager. Due to how query caching works in Hibernate,
query caches *must* always be flushed whenever timestamp caches are flushed.
This class publishes a cluster event to flush query caches on *each* node when timestamp caches are flushed via CacheManager| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
flushCaches() |
<K,V> @NonNull com.atlassian.cache.Cache<K,V> |
getCache(@NonNull Class<?> owningClass,
@NonNull String name) |
<K,V> @NonNull com.atlassian.cache.Cache<K,V> |
getCache(@NonNull String name) |
<K,V> @NonNull com.atlassian.cache.Cache<K,V> |
getCache(@NonNull String name,
@Nullable com.atlassian.cache.CacheLoader<K,V> loader) |
<K,V> @NonNull com.atlassian.cache.Cache<K,V> |
getCache(@NonNull String name,
@Nullable com.atlassian.cache.CacheLoader<K,V> loader,
@NonNull com.atlassian.cache.CacheSettings required) |
<K,V> @NonNull com.atlassian.cache.Cache<K,V> |
getCache(@NonNull String name,
@NonNull Class<K> keyType,
@NonNull Class<V> valueType) |
<V> @NonNull com.atlassian.cache.CachedReference<V> |
getCachedReference(@NonNull Class<?> owningClass,
@NonNull String name,
@NonNull com.atlassian.cache.Supplier<V> supplier) |
<V> @NonNull com.atlassian.cache.CachedReference<V> |
getCachedReference(@NonNull Class<?> owningClass,
@NonNull String name,
@NonNull com.atlassian.cache.Supplier<V> supplier,
@NonNull com.atlassian.cache.CacheSettings required) |
<V> @NonNull com.atlassian.cache.CachedReference<V> |
getCachedReference(@NonNull String name,
@NonNull com.atlassian.cache.Supplier<V> supplier) |
<V> @NonNull com.atlassian.cache.CachedReference<V> |
getCachedReference(@NonNull String name,
@NonNull com.atlassian.cache.Supplier<V> supplier,
@NonNull com.atlassian.cache.CacheSettings required) |
@NonNull Collection<com.atlassian.cache.Cache<?,?>> |
getCaches() |
@Nullable com.atlassian.cache.ManagedCache |
getManagedCache(@NonNull String name) |
@NonNull Collection<com.atlassian.cache.ManagedCache> |
getManagedCaches() |
void |
onClusterCacheFlush(ClusterEventWrapper wrapper)
Timestamp cache region has been flushed, time to flush all local query caches.
|
void |
shutdown() |
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanException@EventListener public void onClusterCacheFlush(ClusterEventWrapper wrapper)
public @NonNull Collection<com.atlassian.cache.Cache<?,?>> getCaches()
getCaches in interface com.atlassian.cache.CacheManagerpublic @NonNull Collection<com.atlassian.cache.ManagedCache> getManagedCaches()
getManagedCaches in interface com.atlassian.cache.CacheManagerpublic void flushCaches()
flushCaches in interface com.atlassian.cache.CacheManagerpublic @Nullable com.atlassian.cache.ManagedCache getManagedCache(@NonNull String name)
getManagedCache in interface com.atlassian.cache.CacheManagerpublic void shutdown()
shutdown in interface com.atlassian.cache.CacheManagerpublic <V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference(@NonNull String name, @NonNull com.atlassian.cache.Supplier<V> supplier)
getCachedReference in interface com.atlassian.cache.CacheFactorypublic <V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference(@NonNull String name, @NonNull com.atlassian.cache.Supplier<V> supplier, @NonNull com.atlassian.cache.CacheSettings required)
getCachedReference in interface com.atlassian.cache.CacheFactorypublic <V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference(@NonNull Class<?> owningClass, @NonNull String name, @NonNull com.atlassian.cache.Supplier<V> supplier)
getCachedReference in interface com.atlassian.cache.CacheFactorypublic <V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference(@NonNull Class<?> owningClass, @NonNull String name, @NonNull com.atlassian.cache.Supplier<V> supplier, @NonNull com.atlassian.cache.CacheSettings required)
getCachedReference in interface com.atlassian.cache.CacheFactorypublic <K,V> @NonNull com.atlassian.cache.Cache<K,V> getCache(@NonNull String name)
getCache in interface com.atlassian.cache.CacheFactorypublic <K,V> @NonNull com.atlassian.cache.Cache<K,V> getCache(@NonNull Class<?> owningClass, @NonNull String name)
getCache in interface com.atlassian.cache.CacheFactorypublic <K,V> @NonNull com.atlassian.cache.Cache<K,V> getCache(@NonNull String name, @Nullable com.atlassian.cache.CacheLoader<K,V> loader)
getCache in interface com.atlassian.cache.CacheFactorypublic <K,V> @NonNull com.atlassian.cache.Cache<K,V> getCache(@NonNull String name, @Nullable com.atlassian.cache.CacheLoader<K,V> loader, @NonNull com.atlassian.cache.CacheSettings required)
getCache in interface com.atlassian.cache.CacheFactoryCopyright © 2003–2021 Atlassian. All rights reserved.