class DefaultJCacheOperationSource.LazyCacheResolver extends java.lang.Object implements CacheResolver
A non-JSR-107 setup requires either a CacheManager
or a CacheResolver
.
If only the latter is specified, it is not possible to extract a default exception
CacheResolver
from a custom CacheResolver
implementation so we have to
fall back on the CacheManager
.
This gives this weird situation of a perfectly valid configuration that breaks all
the sudden because the JCache support is enabled. To avoid this we resolve the default
exception CacheResolver
as late as possible to avoid such hard requirement
in other cases.
Modifier and Type | Field and Description |
---|---|
private SingletonSupplier<CacheResolver> |
cacheResolver |
Constructor and Description |
---|
LazyCacheResolver() |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<? extends Cache> |
resolveCaches(CacheOperationInvocationContext<?> context)
Return the cache(s) to use for the specified invocation.
|
private final SingletonSupplier<CacheResolver> cacheResolver
public java.util.Collection<? extends Cache> resolveCaches(CacheOperationInvocationContext<?> context)
CacheResolver
resolveCaches
in interface CacheResolver
context
- the context of the particular invocationnull
)