Class CaffeineCachingProvider
java.lang.Object
com.github.benmanes.caffeine.jcache.spi.CaffeineCachingProvider
- All Implemented Interfaces:
Closeable,AutoCloseable,CachingProvider
A provider that produces a JCache implementation backed by Caffeine. Typically, this provider is
instantiated using
Caching.getCachingProvider() which discovers this implementation
through a ServiceLoader.
This provider is expected to be used for application life cycle events, like initialization. It is not expected that all requests flow through the provider to obtain the cache manager and cache instances for request operations. Internally, this implementation is synchronized to avoid using excess memory due to its infrequent usage.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidclose(ClassLoader classLoader) voidclose(URI uri, ClassLoader classLoader) getCacheManager(URI uri, ClassLoader classLoader) getCacheManager(URI uri, ClassLoader classLoader, Properties properties) booleanisSupported(OptionalFeature optionalFeature)
-
Constructor Details
-
CaffeineCachingProvider
public CaffeineCachingProvider()
-
-
Method Details
-
getDefaultClassLoader
- Specified by:
getDefaultClassLoaderin interfaceCachingProvider
-
getDefaultURI
- Specified by:
getDefaultURIin interfaceCachingProvider
-
getDefaultProperties
- Specified by:
getDefaultPropertiesin interfaceCachingProvider
-
getCacheManager
- Specified by:
getCacheManagerin interfaceCachingProvider
-
getCacheManager
- Specified by:
getCacheManagerin interfaceCachingProvider
-
getCacheManager
- Specified by:
getCacheManagerin interfaceCachingProvider
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCachingProvider- Specified by:
closein interfaceCloseable
-
close
- Specified by:
closein interfaceCachingProvider
-
close
- Specified by:
closein interfaceCachingProvider
-
isSupported
- Specified by:
isSupportedin interfaceCachingProvider
-