Interface CacheProvider
-
- All Known Implementing Classes:
AbstractProvider
,BaseProvider
,GuavaCacheProvider
,NoopCacheProvider
,StandardCacheProvider
public interface CacheProvider
Provider (AKA factory) ofCache
s.Users typically obtain an implementation of this from the OSGi service registry.
Cache
instances produced by this service are neither transactional, nor distributed, nor persistent.Implementations of this interface are expected to be thread-safe.
- Author:
- Michael Vorburger.ch
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <K,V>
Cache<K,V>newCache(CacheConfig<K,V> cacheConfig)
Creates a brand newCache
(API with unchecked exceptions), based on the passed configuration and a default policy.<K,V>
Cache<K,V>newCache(CacheConfig<K,V> cacheConfig, CachePolicy initialPolicy)
Creates a brand newCache
(API with unchecked exceptions), based on the passed configuration and policy.<K,V,E extends Exception>
CheckedCache<K,V,E>newCheckedCache(CheckedCacheConfig<K,V,E> cacheConfig)
Creates a brand newCheckedCache
(API for checked exceptions), based on the passed configuration and a default policy.<K,V,E extends Exception>
CheckedCache<K,V,E>newCheckedCache(CheckedCacheConfig<K,V,E> cacheConfig, CachePolicy initialPolicy)
Creates a brand newCheckedCache
(API for checked exceptions), based on the passed configuration and policy.
-
-
-
Method Detail
-
newCache
<K,V> Cache<K,V> newCache(CacheConfig<K,V> cacheConfig, CachePolicy initialPolicy)
Creates a brand newCache
(API with unchecked exceptions), based on the passed configuration and policy. It is the caller's responsibility toAutoCloseable.close()
a Cache obtained from this when they stop.
-
newCache
<K,V> Cache<K,V> newCache(CacheConfig<K,V> cacheConfig)
Creates a brand newCache
(API with unchecked exceptions), based on the passed configuration and a default policy. It is the caller's responsibility toAutoCloseable.close()
a Cache obtained from this when they stop.
-
newCheckedCache
<K,V,E extends Exception> CheckedCache<K,V,E> newCheckedCache(CheckedCacheConfig<K,V,E> cacheConfig, CachePolicy initialPolicy)
Creates a brand newCheckedCache
(API for checked exceptions), based on the passed configuration and policy. It is the caller's responsibility toAutoCloseable.close()
a Cache obtained from this when they stop.
-
newCheckedCache
<K,V,E extends Exception> CheckedCache<K,V,E> newCheckedCache(CheckedCacheConfig<K,V,E> cacheConfig)
Creates a brand newCheckedCache
(API for checked exceptions), based on the passed configuration and a default policy. It is the caller's responsibility toAutoCloseable.close()
a Cache obtained from this when they stop.
-
-