Package org.eclipse.hono.cache
Interface CacheProvider
-
public interface CacheProvider
A provider for cache instances.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <K,V>
ExpiringValueCache<K,V>getCache(String cacheName)
Gets a cache instance by name.
-
-
-
Method Detail
-
getCache
<K,V> ExpiringValueCache<K,V> getCache(String cacheName)
Gets a cache instance by name.It is up to the implementation how the cache instance is created and/or if a new instance is being created or an existing one is returned.
- Type Parameters:
K
- The type of keys that the cache supports.V
- The type of values that the cache supports.- Parameters:
cacheName
- The name of the cache to get.- Returns:
- The new cache instance, may be
null
if no cache with that name can be provided. - Throws:
NullPointerException
- if the cache name isnull
.
-
-