com.atlassian.cache
Interface CacheManager

All Superinterfaces:
CacheFactory
All Known Implementing Classes:
AbstractCacheManager, EhCacheManager, HazelcastCacheManager, MemoryCacheManager

@Internal
public interface CacheManager
extends CacheFactory


Method Summary
 void flushCaches()
          Flush the contents of all flushable caches registered with the cache manager.
 Collection<Cache<?,?>> getCaches()
          Deprecated. Since 2.0. Use getManagedCaches() instead.
 ManagedCache getManagedCache(String name)
          Returns the managed cache for the specified name.
 Collection<ManagedCache> getManagedCaches()
          Gets the collection of caches managed.
 void shutdown()
          Shuts down and clean all data of the current instance and its all caches.
 
Methods inherited from interface com.atlassian.cache.CacheFactory
getCache, getCache, getCache, getCache, getCache, getCachedReference, getCachedReference, getCachedReference, getCachedReference
 

Method Detail

getCaches

@Deprecated
@Nonnull
Collection<Cache<?,?>> getCaches()
Deprecated. Since 2.0. Use getManagedCaches() instead.

Gets the collection of caches managed. This collection is not a "live" collection. It is a copy.

Returns:
a collection of Caches. The returned collection will only include caches created via the getCache(...) methods. Caches created via the getCachedReference(...) methods are not included.

getManagedCaches

@Nonnull
Collection<ManagedCache> getManagedCaches()
Gets the collection of caches managed. This collection is not a "live" collection. It is a copy. The returned collection will include caches created via both the getCache(...) and getCachedReference(...) methods.

Returns:
a collection of ManagedCaches.

flushCaches

void flushCaches()
Flush the contents of all flushable caches registered with the cache manager.

See Also:
CacheSettings.getFlushable()

getManagedCache

@Nullable
ManagedCache getManagedCache(@Nonnull
                                      String name)
Returns the managed cache for the specified name.

Parameters:
name - the name of the managed cache to retrieve
Returns:
the ManagedCache specified by name or null if no cache exists.
Since:
2.3.0

shutdown

void shutdown()
Shuts down and clean all data of the current instance and its all caches.

Since:
2.4.0


Copyright © 2015 Atlassian. All rights reserved.