@Singleton public class StandardCacheProvider extends BaseProvider
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.
Constructor and Description |
---|
StandardCacheProvider(CacheManagersRegistry cacheManagersRegistry) |
Modifier and Type | Method and Description |
---|---|
<K,V> Cache<K,V> |
newCache(CacheConfig<K,V> cacheConfig,
CachePolicy initialPolicy)
Creates a brand new
Cache (API with unchecked exceptions), based on the passed configuration and policy. |
<K,V,E extends Exception> |
newCheckedCache(CheckedCacheConfig<K,V,E> cacheConfig,
CachePolicy initialPolicy)
Creates a brand new
CheckedCache (API for checked exceptions), based
on the passed configuration and policy. |
newCache, newCheckedCache
@Inject public StandardCacheProvider(CacheManagersRegistry cacheManagersRegistry)
public <K,V> Cache<K,V> newCache(CacheConfig<K,V> cacheConfig, CachePolicy initialPolicy)
CacheProvider
Cache
(API with unchecked exceptions), based on the passed configuration and policy.
It is the caller's responsibility to AutoCloseable.close()
a Cache obtained from this when they stop.public <K,V,E extends Exception> CheckedCache<K,V,E> newCheckedCache(CheckedCacheConfig<K,V,E> cacheConfig, CachePolicy initialPolicy)
CacheProvider
CheckedCache
(API for checked exceptions), based
on the passed configuration and policy.
It is the caller's responsibility to AutoCloseable.close()
a Cache obtained from this when they stop.Copyright © 2019 OpenDaylight. All rights reserved.