public static interface AuthoritativeTier.Provider extends Service
Service interface for providing AuthoritativeTier instances.
Multiple providers may exist in a given CacheManager.
| Modifier and Type | Method and Description |
|---|---|
<K,V> AuthoritativeTier<K,V> |
createAuthoritativeTier(Store.Configuration<K,V> storeConfig,
ServiceConfiguration<?,?>... serviceConfigs)
Creates a new
AuthoritativeTier instance using the provided configuration. |
void |
initAuthoritativeTier(AuthoritativeTier<?,?> resource)
Initialises an
AuthoritativeTier. |
int |
rankAuthority(ResourceType<?> authorityResource,
java.util.Collection<ServiceConfiguration<?,?>> serviceConfigs)
Gets the internal ranking for the
AuthoritativeTier instances provided by this Provider of the
authority's ability to handle the specified resource. |
void |
releaseAuthoritativeTier(AuthoritativeTier<?,?> resource)
Releases an
AuthoritativeTier. |
<K,V> AuthoritativeTier<K,V> createAuthoritativeTier(Store.Configuration<K,V> storeConfig, ServiceConfiguration<?,?>... serviceConfigs)
AuthoritativeTier instance using the provided configuration.K - the key type for this tierV - the value type for this tierstoreConfig - the Store configurationserviceConfigs - a collection of service configurationsvoid releaseAuthoritativeTier(AuthoritativeTier<?,?> resource)
AuthoritativeTier.resource - the authoritative tier to releasejava.lang.IllegalArgumentException - if this provider does not know about this authoritative tiervoid initAuthoritativeTier(AuthoritativeTier<?,?> resource)
AuthoritativeTier.resource - the authoritative tier to initialiseint rankAuthority(ResourceType<?> authorityResource, java.util.Collection<ServiceConfiguration<?,?>> serviceConfigs)
AuthoritativeTier instances provided by this Provider of the
authority's ability to handle the specified resource.
A higher rank value indicates a more capable AuthoritativeTier.
authorityResource - the ResourceType for the authority to handleserviceConfigs - the collection of ServiceConfiguration instances that may contribute
to the rankingAuthoritativeTier created by this Provider
to handle the resource type specified by authorityResource; a rank of 0 indicates the authority
can not handle the type specified in authorityResource