Class StandardCacheProvider
- java.lang.Object
-
- org.opendaylight.infrautils.caches.baseimpl.BaseProvider
-
- org.opendaylight.infrautils.caches.standard.StandardCacheProvider
-
- All Implemented Interfaces:
CacheProvider
@Singleton public class StandardCacheProvider extends BaseProvider
Default standard usual ordinary habitual ;)CacheProvider
. Use this for example when writing an end2end component test and wanting to bind to "just some implementation, the usual one that will probably be available at runtime".In the future, this may be extended to allow dynamically switching out cache implementations at run-time. Therefore, all client code should refer to this instead of another specific implementation.
- Author:
- Michael Vorburger.ch
-
-
Constructor Summary
Constructors Constructor Description StandardCacheProvider(CacheManagersRegistry cacheManagersRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <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, CachePolicy initialPolicy)
Creates a brand newCheckedCache
(API for checked exceptions), based on the passed configuration and policy.-
Methods inherited from class org.opendaylight.infrautils.caches.baseimpl.BaseProvider
newCache, newCheckedCache
-
-
-
-
Constructor Detail
-
StandardCacheProvider
@Inject public StandardCacheProvider(CacheManagersRegistry cacheManagersRegistry)
-
-
Method Detail
-
newCache
public <K,V> Cache<K,V> newCache(CacheConfig<K,V> cacheConfig, CachePolicy initialPolicy)
Description copied from interface:CacheProvider
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.
-
newCheckedCache
public <K,V,E extends Exception> CheckedCache<K,V,E> newCheckedCache(CheckedCacheConfig<K,V,E> cacheConfig, CachePolicy initialPolicy)
Description copied from interface:CacheProvider
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.
-
-