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 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(Collection<String> nonFlushableCacheNames, ConfluenceMonitoring confluenceMonitoring)
           
 
Method Summary
 void flushCaches()
           
<K,V> com.atlassian.cache.Cache<K,V>
getCache(Class<?> owningClass, String name)
           
<K,V> com.atlassian.confluence.cache.ehcache.ConfluenceEhCache<K,V>
getCache(String name)
           
<K,V> com.atlassian.cache.Cache<K,V>
getCache(String name, com.atlassian.cache.CacheLoader<K,V> loader)
           
<K,V> com.atlassian.confluence.cache.ehcache.ConfluenceEhCache<K,V>
getCache(String name, com.atlassian.cache.CacheLoader<K,V> loader, com.atlassian.cache.CacheSettings settings)
           
<K,V> com.atlassian.cache.Cache<K,V>
getCache(String name, Class<K> keyType, Class<V> valueType)
          Deprecated. 
<V> com.atlassian.cache.CachedReference<V>
getCachedReference(Class<?> owningClass, String fieldName, com.atlassian.cache.Supplier<V> supplier)
           
<V> com.atlassian.cache.CachedReference<V>
getCachedReference(Class<?> owningClass, String fieldName, com.atlassian.cache.Supplier<V> supplier, com.atlassian.cache.CacheSettings settings)
           
<V> com.atlassian.cache.CachedReference<V>
getCachedReference(String name, com.atlassian.cache.Supplier<V> supplier)
           
<V> com.atlassian.cache.CachedReference<V>
getCachedReference(String name, com.atlassian.cache.Supplier<V> supplier, com.atlassian.cache.CacheSettings settings)
           
 Collection<com.atlassian.cache.Cache<?,?>> getCaches()
           
 com.atlassian.cache.ManagedCache getManagedCache(String name)
           
 Collection<com.atlassian.cache.ManagedCache> getManagedCaches()
           
 void shutdown()
           
 void shutdownCacheManager()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EhCacheManager

public EhCacheManager(Collection<String> nonFlushableCacheNames,
                      ConfluenceMonitoring confluenceMonitoring)
               throws IOException
Throws:
IOException
Method Detail

shutdownCacheManager

@PreDestroy
public void shutdownCacheManager()

flushCaches

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

getCaches

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

getCache

@Nonnull
public <K,V> com.atlassian.confluence.cache.ehcache.ConfluenceEhCache<K,V> getCache(@Nonnull
                                                                                            String name)
Specified by:
getCache in interface com.atlassian.cache.CacheFactory

getCache

@Nonnull
@Deprecated
public <K,V> com.atlassian.cache.Cache<K,V> getCache(@Nonnull
                                                                        String name,
                                                                        @Nonnull
                                                                        Class<K> keyType,
                                                                        @Nonnull
                                                                        Class<V> valueType)
Deprecated. 

Specified by:
getCache in interface com.atlassian.cache.CacheFactory

getManagedCaches

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

getManagedCache

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

shutdown

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

getCachedReference

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

getCachedReference

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

getCachedReference

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

getCachedReference

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

getCache

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

getCache

@Nonnull
public <K,V> com.atlassian.cache.Cache<K,V> getCache(@Nonnull
                                                             String name,
                                                             com.atlassian.cache.CacheLoader<K,V> loader)
Specified by:
getCache in interface com.atlassian.cache.CacheFactory

getCache

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


Copyright © 2003–2015 Atlassian. All rights reserved.