com.atlassian.confluence.cache.ehcache
Class EhCacheManager

java.lang.Object
  extended by com.atlassian.confluence.cache.ehcache.EhCacheManager
All Implemented Interfaces:
com.atlassian.cache.CacheFactory, com.atlassian.cache.CacheManager

public class EhCacheManager
extends java.lang.Object
implements com.atlassian.cache.CacheManager

Confluence-specific implementation of CacheManager which delegates to an atlassian-cache com.atlassian.cache.ehcache.EhCacheManager, decorating it with Confluence-specific functionality.


Constructor Summary
EhCacheManager(java.util.Collection<java.lang.String> nonFlushableCacheNames)
           
 
Method Summary
 void flushCaches()
           
<K,V> ConfluenceEhCache<K,V>
getCache(java.lang.Class<?> owningClass, java.lang.String name)
           
<K,V> ConfluenceEhCache<K,V>
getCache(java.lang.String name)
           
<K,V> ConfluenceEhCache<K,V>
getCache(java.lang.String name, com.atlassian.cache.CacheLoader<K,V> loader)
           
<K,V> ConfluenceEhCache<K,V>
getCache(java.lang.String name, com.atlassian.cache.CacheLoader<K,V> loader, com.atlassian.cache.CacheSettings settings)
           
<K,V> ConfluenceEhCache<K,V>
getCache(java.lang.String name, java.lang.Class<K> keyType, java.lang.Class<V> valueType)
           
<V> com.atlassian.cache.CachedReference<V>
getCachedReference(java.lang.Class<?> owningClass, java.lang.String fieldName, com.atlassian.cache.Supplier<V> supplier)
           
<V> com.atlassian.cache.CachedReference<V>
getCachedReference(java.lang.Class<?> owningClass, java.lang.String fieldName, com.atlassian.cache.Supplier<V> supplier, com.atlassian.cache.CacheSettings settings)
           
<V> com.atlassian.cache.CachedReference<V>
getCachedReference(java.lang.String name, com.atlassian.cache.Supplier<V> supplier)
           
<V> com.atlassian.cache.CachedReference<V>
getCachedReference(java.lang.String name, com.atlassian.cache.Supplier<V> supplier, com.atlassian.cache.CacheSettings settings)
           
 java.util.Collection<com.atlassian.cache.Cache<?,?>> getCaches()
           
 com.atlassian.cache.ManagedCache getManagedCache(java.lang.String name)
           
 java.util.Collection<com.atlassian.cache.ManagedCache> getManagedCaches()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EhCacheManager

public EhCacheManager(java.util.Collection<java.lang.String> nonFlushableCacheNames)
Method Detail

flushCaches

public void flushCaches()
Specified by:
flushCaches in interface com.atlassian.cache.CacheManager

getCaches

public java.util.Collection<com.atlassian.cache.Cache<?,?>> getCaches()
Specified by:
getCaches in interface com.atlassian.cache.CacheManager

getCache

public <K,V> ConfluenceEhCache<K,V> getCache(java.lang.String name)
Specified by:
getCache in interface com.atlassian.cache.CacheFactory

getCache

public <K,V> ConfluenceEhCache<K,V> getCache(java.lang.String name,
                                             java.lang.Class<K> keyType,
                                             java.lang.Class<V> valueType)
Specified by:
getCache in interface com.atlassian.cache.CacheFactory

getManagedCaches

public java.util.Collection<com.atlassian.cache.ManagedCache> getManagedCaches()
Specified by:
getManagedCaches in interface com.atlassian.cache.CacheManager

getManagedCache

public com.atlassian.cache.ManagedCache getManagedCache(@NotNull
                                                        java.lang.String name)
Specified by:
getManagedCache in interface com.atlassian.cache.CacheManager

getCachedReference

public <V> com.atlassian.cache.CachedReference<V> getCachedReference(java.lang.String name,
                                                                     com.atlassian.cache.Supplier<V> supplier)
Specified by:
getCachedReference in interface com.atlassian.cache.CacheFactory

getCachedReference

public <V> com.atlassian.cache.CachedReference<V> getCachedReference(java.lang.String name,
                                                                     com.atlassian.cache.Supplier<V> supplier,
                                                                     com.atlassian.cache.CacheSettings settings)
Specified by:
getCachedReference in interface com.atlassian.cache.CacheFactory

getCachedReference

public <V> com.atlassian.cache.CachedReference<V> getCachedReference(java.lang.Class<?> owningClass,
                                                                     java.lang.String fieldName,
                                                                     com.atlassian.cache.Supplier<V> supplier)
Specified by:
getCachedReference in interface com.atlassian.cache.CacheFactory

getCachedReference

public <V> com.atlassian.cache.CachedReference<V> getCachedReference(java.lang.Class<?> owningClass,
                                                                     java.lang.String fieldName,
                                                                     com.atlassian.cache.Supplier<V> supplier,
                                                                     com.atlassian.cache.CacheSettings settings)
Specified by:
getCachedReference in interface com.atlassian.cache.CacheFactory

getCache

public <K,V> ConfluenceEhCache<K,V> getCache(java.lang.Class<?> owningClass,
                                             java.lang.String name)
Specified by:
getCache in interface com.atlassian.cache.CacheFactory

getCache

public <K,V> ConfluenceEhCache<K,V> getCache(java.lang.String name,
                                             com.atlassian.cache.CacheLoader<K,V> loader)
Specified by:
getCache in interface com.atlassian.cache.CacheFactory

getCache

public <K,V> ConfluenceEhCache<K,V> getCache(java.lang.String name,
                                             com.atlassian.cache.CacheLoader<K,V> loader,
                                             com.atlassian.cache.CacheSettings settings)
Specified by:
getCache in interface com.atlassian.cache.CacheFactory


Copyright © 2003-2014 Atlassian. All Rights Reserved.