Class AbstractProvider
- java.lang.Object
-
- org.opendaylight.infrautils.caches.baseimpl.AbstractProvider
-
- All Implemented Interfaces:
CacheProvider
- Direct Known Subclasses:
GuavaCacheProvider,NoopCacheProvider
public abstract class AbstractProvider extends Object implements CacheProvider
Base class of CacheProvider, useful for API implementors (not users).- Author:
- Michael Vorburger.ch
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractProvider(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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opendaylight.infrautils.caches.CacheProvider
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:CacheProviderCreates 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.- Specified by:
newCachein interfaceCacheProvider
-
newCheckedCache
public final <K,V,E extends Exception> CheckedCache<K,V,E> newCheckedCache(CheckedCacheConfig<K,V,E> cacheConfig, CachePolicy initialPolicy)
Description copied from interface:CacheProviderCreates 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.- Specified by:
newCheckedCachein interfaceCacheProvider
-
-