|
|
@ -128,6 +128,21 @@ public abstract class AbstractCacheManager implements CacheManager, Initializing |
|
|
|
return this.cacheMap.get(name); |
|
|
|
return this.cacheMap.get(name); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Dynamically register an additional Cache with this manager. |
|
|
|
|
|
|
|
* @param cache the Cache to register |
|
|
|
|
|
|
|
* @deprecated as of Spring 4.3, in favor of {@link #getMissingCache(String)} |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Deprecated |
|
|
|
|
|
|
|
protected final void addCache(Cache cache) { |
|
|
|
|
|
|
|
String name = cache.getName(); |
|
|
|
|
|
|
|
synchronized (this.cacheMap) { |
|
|
|
|
|
|
|
if (this.cacheMap.put(name, decorateCache(cache)) == null) { |
|
|
|
|
|
|
|
updateCacheNames(name); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Update the exposed {@link #cacheNames} set with the given name. |
|
|
|
* Update the exposed {@link #cacheNames} set with the given name. |
|
|
|
* <p>This will always be called within a full {@link #cacheMap} lock |
|
|
|
* <p>This will always be called within a full {@link #cacheMap} lock |
|
|
|