Top Description Inners Fields Constructors Methods
org.springframework.cache.annotation

public abstract Class AbstractCachingConfiguration

extends Object
implements ImportAware
Class Inheritance
All Implemented Interfaces
org.springframework.context.annotation.ImportAware, org.springframework.beans.factory.Aware
Known Direct Subclasses
org.springframework.cache.annotation.ProxyCachingConfiguration
Annotations
@Configuration
proxyBeanMethods:false
Imports
java.util.List, java.util.function.Function, .Supplier, org.springframework.beans.factory.ObjectProvider, org.springframework.beans.factory.annotation.Autowired, org.springframework.cache.CacheManager, org.springframework.cache.interceptor.CacheErrorHandler, .CacheResolver, .KeyGenerator, org.springframework.context.annotation.Configuration, .ImportAware, org.springframework.core.annotation.AnnotationAttributes, org.springframework.core.type.AnnotationMetadata, org.springframework.lang.Nullable, org.springframework.util.CollectionUtils, org.springframework.util.function.SingletonSupplier

Abstract base @Configuration class providing common structure for enabling Spring's annotation-driven cache management capability.
Authors
Chris Beams, Stephane Nicoll, Juergen Hoeller
Since
3.1
See Also
EnableCaching

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class

Field Summary

Modifier and TypeField and Description
protected Supplier<CacheManager>
protected Supplier<CacheResolver>
protected AnnotationAttributes
protected Supplier<CacheErrorHandler>
protected Supplier<KeyGenerator>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public void
setImportMetadata(AnnotationMetadata importMetadata)

Implements org.springframework.context.annotation.ImportAware.setImportMetadata.

Set the annotation metadata of the importing @Configuration class.

protected void
useCachingConfigurer(AbstractCachingConfiguration.CachingConfigurerSupplier cachingConfigurerSupplier)

Extract the configuration from the nominated CachingConfigurer.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheManagerback to summary
protected Supplier<CacheManager> cacheManager
Annotations
@Nullable
cacheResolverback to summary
protected Supplier<CacheResolver> cacheResolver
Annotations
@Nullable
enableCachingback to summary
protected AnnotationAttributes enableCaching
Annotations
@Nullable
errorHandlerback to summary
protected Supplier<CacheErrorHandler> errorHandler
Annotations
@Nullable
keyGeneratorback to summary
protected Supplier<KeyGenerator> keyGenerator
Annotations
@Nullable

Constructor Detail

AbstractCachingConfigurationback to summary
public AbstractCachingConfiguration()

Method Detail

setConfigurersback to summary
pack-priv void setConfigurers(ObjectProvider<CachingConfigurer> configurers)
Annotations
@Autowired
setImportMetadataback to summary
public void setImportMetadata(AnnotationMetadata importMetadata)

Implements org.springframework.context.annotation.ImportAware.setImportMetadata.

Doc from org.springframework.context.annotation.ImportAware.setImportMetadata.

Set the annotation metadata of the importing @Configuration class.

Annotations
@Override
useCachingConfigurerback to summary
protected void useCachingConfigurer(AbstractCachingConfiguration.CachingConfigurerSupplier cachingConfigurerSupplier)

Extract the configuration from the nominated CachingConfigurer.

org.springframework.cache.annotation back to summary

protected Class AbstractCachingConfiguration.CachingConfigurerSupplier

extends Object
Class Inheritance
  • java.lang.Object
  • org.springframework.cache.annotation.AbstractCachingConfiguration.CachingConfigurerSupplier

Field Summary

Modifier and TypeField and Description
private final Supplier<CachingConfigurer>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public <
the type of the supplier
T
>
Supplier<T>

Returns:

another supplier mapped by the specified function
adapt
(Function<CachingConfigurer, T>
the provider to use to adapt the supplier
provider
)

Adapt the CachingConfigurer supplier to another supplier provided by the specified mapping function.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

supplierback to summary
private final Supplier<CachingConfigurer> supplier

Constructor Detail

CachingConfigurerSupplierback to summary
public CachingConfigurerSupplier(Supplier<CachingConfigurer> supplier)

Method Detail

adaptback to summary
public <T> Supplier<T> adapt(Function<CachingConfigurer, T> provider)

Adapt the CachingConfigurer supplier to another supplier provided by the specified mapping function. If the underlying CachingConfigurer is null, null is returned and the mapping function is not invoked.

Parameters
<T>
the type of the supplier
provider:Function<CachingConfigurer, T>

the provider to use to adapt the supplier

Returns:Supplier<T>

another supplier mapped by the specified function

Annotations
@Nullable