public static interface CachingTier.Provider extends Service
Service
interface for providing CachingTier
instances.
Multiple providers may exist in a single CacheManager
.
Modifier and Type | Method and Description |
---|---|
<K,V> CachingTier<K,V> |
createCachingTier(Store.Configuration<K,V> storeConfig,
ServiceConfiguration<?,?>... serviceConfigs)
Creates a new
CachingTier instance using the provided configuration |
void |
initCachingTier(CachingTier<?,?> resource)
Initialises a
CachingTier . |
int |
rankCachingTier(java.util.Set<ResourceType<?>> resourceTypes,
java.util.Collection<ServiceConfiguration<?,?>> serviceConfigs)
Gets the internal ranking for the
CachingTier instances provided by this Provider of the
caching tier's ability to handle the specified resources. |
void |
releaseCachingTier(CachingTier<?,?> resource)
Releases a
CachingTier . |
<K,V> CachingTier<K,V> createCachingTier(Store.Configuration<K,V> storeConfig, ServiceConfiguration<?,?>... serviceConfigs)
CachingTier
instance using the provided configurationK
- the key type for this tierV
- the value type for this tierstoreConfig
- the Store
configurationserviceConfigs
- a collection of service configurationsvoid releaseCachingTier(CachingTier<?,?> resource)
CachingTier
.resource
- the caching tier to releasejava.lang.IllegalArgumentException
- if this provider does not know about this caching tiervoid initCachingTier(CachingTier<?,?> resource)
CachingTier
.resource
- the caching tier to initialiseint rankCachingTier(java.util.Set<ResourceType<?>> resourceTypes, java.util.Collection<ServiceConfiguration<?,?>> serviceConfigs)
CachingTier
instances provided by this Provider
of the
caching tier's ability to handle the specified resources.
A higher rank value indicates a more capable CachingTier
.
resourceTypes
- the set of ResourceType
s for the store to handleserviceConfigs
- the collection of ServiceConfiguration
instances that may contribute
to the rankingCachingTier
created by this Provider
to handle the resource types specified by resourceTypes
; a rank of 0 indicates the caching tier
can not handle the type specified in resourceTypes