/** * Resolve the cache to use. * @param context the invocation context * @return the cache to use (never null) */ protected Cache resolveCache(CacheOperationInvocationContext<O> context) { Collection<? extends Cache> caches = context.getOperation().getCacheResolver().resolveCaches(context); Cache cache = extractFrom(caches); if (cache == null) { throw new IllegalStateException("Cache could not have been resolved for " + context.getOperation()); } return cache; }
/** * Resolve the cache to use. * @param context the invocation context * @return the cache to use (never null) */ protected Cache resolveCache(CacheOperationInvocationContext<O> context) { Collection<? extends Cache> caches = context.getOperation().getCacheResolver().resolveCaches(context); Cache cache = extractFrom(caches); if (cache == null) { throw new IllegalStateException("Cache could not have been resolved for " + context.getOperation()); } return cache; }
/** * Resolve the cache to use. * @param context the invocation context * @return the cache to use (never null) */ protected Cache resolveCache(CacheOperationInvocationContext<O> context) { Collection<? extends Cache> caches = context.getOperation().getCacheResolver().resolveCaches(context); Cache cache = extractFrom(caches); if (cache == null) { throw new IllegalStateException("Cache could not have been resolved for " + context.getOperation()); } return cache; }