AbstractCacheManager

Very simple abstract {@code CacheManager} implementation that retains all created {@link Cache Cache} instances in an in-memory {@link ConcurrentMap ConcurrentMap}. {@code Cache} instance creation is left to subclasses via the {@link #createCache createCache} method implementation.

@since 1.0

Constructors

this
this()

Default no-arg constructor that instantiates an internal name-to-cache {@code ConcurrentMap}.

Members

Functions

createCache
Cache!(K, V) createCache(string name)

Creates a new {@code Cache} instance associated with the specified {@code name}.

destroy
void destroy()

Cleanup method that first {@link LifecycleUtils#destroy destroys} all of it's managed caches and then {@link java.util.Map#clear clears} out the internally referenced cache map.

getCache
Cache!(K, V) getCache(string name)

Returns the cache with the specified {@code name}. If the cache instance does not yet exist, it will be lazily created, retained for further access, and then returned.

toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From Destroyable

destroy
void destroy()

Called when this object is being destroyed, allowing any necessary cleanup of internal resources.

Meta