@Override public Set<String> getCacheNames() { return Collections.singleton(getCacheName()); }
@Override public String toString() { return getOperationDescription().append("]").toString(); }
/** * Construct a new {@code AbstractJCacheOperation}. * @param methodDetails the {@link CacheMethodDetails} related to the cached method * @param cacheResolver the cache resolver to resolve regular caches */ protected AbstractJCacheOperation(CacheMethodDetails<A> methodDetails, CacheResolver cacheResolver) { Assert.notNull(methodDetails, "CacheMethodDetails must not be null"); Assert.notNull(cacheResolver, "CacheResolver must not be null"); this.methodDetails = methodDetails; this.cacheResolver = cacheResolver; this.allParameterDetails = initializeAllParameterDetails(methodDetails.getMethod()); }
/** * 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; }
/** * Construct a new {@code AbstractJCacheOperation}. * @param methodDetails the {@link CacheMethodDetails} related to the cached method * @param cacheResolver the cache resolver to resolve regular caches */ protected AbstractJCacheOperation(CacheMethodDetails<A> methodDetails, CacheResolver cacheResolver) { Assert.notNull(methodDetails, "CacheMethodDetails must not be null"); Assert.notNull(cacheResolver, "CacheResolver must not be null"); this.methodDetails = methodDetails; this.cacheResolver = cacheResolver; this.allParameterDetails = initializeAllParameterDetails(methodDetails.getMethod()); }
@Override public Set<String> getCacheNames() { return Collections.singleton(getCacheName()); }
/** * 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; }
@Override public String toString() { return getOperationDescription().append("]").toString(); }
/** * Create a new instance. * @param methodDetails the {@link CacheMethodDetails} related to the cached method * @param cacheResolver the cache resolver to resolve regular caches */ protected AbstractJCacheOperation(CacheMethodDetails<A> methodDetails, CacheResolver cacheResolver) { Assert.notNull(methodDetails, "method details must not be null."); Assert.notNull(cacheResolver, "cache resolver must not be null."); this.methodDetails = methodDetails; this.cacheResolver = cacheResolver; this.allParameterDetails = initializeAllParameterDetails(methodDetails.getMethod()); }
@Override public Set<String> getCacheNames() { return Collections.singleton(getCacheName()); }
@Override public String toString() { return getOperationDescription().append("]").toString(); }