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 new instance of a cache by name.
-
-
-
Method Detail
-
getCache
<K,V> ExpiringValueCache<K,V> getCache(String cacheName)
Gets a new instance of a cache by name.It is up to the provider how the cache instance is created, or it creates a new or returns an existing one.
- 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. Must not benull
.- Returns:
- The new cache instance, may be
null
if no cache with that name can be provided. - Throws:
NullPointerException
- if the cache name isnull
.
-
-