org.springframework.cache.jcache.JCacheCache Java Examples
The following examples show how to use
org.springframework.cache.jcache.JCacheCache.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CacheResolverAdapter.java From spring-analysis-note with MIT License | 5 votes |
@Override public Collection<? extends Cache> resolveCaches(CacheOperationInvocationContext<?> context) { if (!(context instanceof CacheInvocationContext<?>)) { throw new IllegalStateException("Unexpected context " + context); } CacheInvocationContext<?> cacheInvocationContext = (CacheInvocationContext<?>) context; javax.cache.Cache<Object, Object> cache = this.target.resolveCache(cacheInvocationContext); if (cache == null) { throw new IllegalStateException("Could not resolve cache for " + context + " using " + this.target); } return Collections.singleton(new JCacheCache(cache)); }
Example #2
Source File: CacheResolverAdapter.java From java-technology-stack with MIT License | 5 votes |
@Override public Collection<? extends Cache> resolveCaches(CacheOperationInvocationContext<?> context) { if (!(context instanceof CacheInvocationContext<?>)) { throw new IllegalStateException("Unexpected context " + context); } CacheInvocationContext<?> cacheInvocationContext = (CacheInvocationContext<?>) context; javax.cache.Cache<Object, Object> cache = this.target.resolveCache(cacheInvocationContext); if (cache == null) { throw new IllegalStateException("Could not resolve cache for " + context + " using " + this.target); } return Collections.singleton(new JCacheCache(cache)); }
Example #3
Source File: CacheResolverAdapter.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public Collection<? extends Cache> resolveCaches(CacheOperationInvocationContext<?> context) { if (!(context instanceof CacheInvocationContext<?>)) { throw new IllegalStateException("Unexpected context " + context); } CacheInvocationContext<?> cacheInvocationContext = (CacheInvocationContext<?>) context; javax.cache.Cache<Object, Object> cache = target.resolveCache(cacheInvocationContext); Assert.notNull(cache, "Cannot resolve cache for '" + context + "' using '" + target + "'"); return Collections.singleton(new JCacheCache(cache)); }
Example #4
Source File: CacheResolverAdapter.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Override public Collection<? extends Cache> resolveCaches(CacheOperationInvocationContext<?> context) { if (!(context instanceof CacheInvocationContext<?>)) { throw new IllegalStateException("Unexpected context " + context); } CacheInvocationContext<?> cacheInvocationContext = (CacheInvocationContext<?>) context; javax.cache.Cache<Object, Object> cache = target.resolveCache(cacheInvocationContext); Assert.notNull(cache, "Cannot resolve cache for '" + context + "' using '" + target + "'"); return Collections.singleton(new JCacheCache(cache)); }