Class AbstractProvider
- java.lang.Object
-
- org.opendaylight.infrautils.caches.baseimpl.BaseProvider
-
- org.opendaylight.infrautils.caches.baseimpl.AbstractProvider
-
- All Implemented Interfaces:
CacheProvider
- Direct Known Subclasses:
GuavaCacheProvider
,NoopCacheProvider
public abstract class AbstractProvider extends BaseProvider
Base class of CacheProvider, useful for API implementors (not users).- Author:
- Michael Vorburger.ch
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractProvider(CacheManagersRegistry cachesMonitor)
-
Method Summary
All Methods Instance Methods Abstract 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.protected abstract <K,V>
Cache<K,V>newUnregisteredCache(CacheConfig<K,V> cacheConfig, CachePolicy initialPolicy)
protected abstract <K,V,E extends Exception>
CheckedCache<K,V,E>newUnregisteredCheckedCache(CheckedCacheConfig<K,V,E> cacheConfig, CachePolicy initialPolicy)
-
Methods inherited from class org.opendaylight.infrautils.caches.baseimpl.BaseProvider
newCache, newCheckedCache
-
-
-
-
Constructor Detail
-
AbstractProvider
protected AbstractProvider(CacheManagersRegistry cachesMonitor)
-
-
Method Detail
-
newUnregisteredCache
protected abstract <K,V> Cache<K,V> newUnregisteredCache(CacheConfig<K,V> cacheConfig, CachePolicy initialPolicy)
-
newUnregisteredCheckedCache
protected abstract <K,V,E extends Exception> CheckedCache<K,V,E> newUnregisteredCheckedCache(CheckedCacheConfig<K,V,E> cacheConfig, CachePolicy initialPolicy)
-
newCache
public final <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 final <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.
-
-