public abstract class EndpointDiscoveryIdentifiersRefreshCache<K> extends Object
Constructor and Description |
---|
EndpointDiscoveryIdentifiersRefreshCache(EndpointDiscoveryCacheLoader cacheLoader) |
Modifier and Type | Method and Description |
---|---|
abstract String |
constructKey(String key,
AmazonWebServiceRequest discoveryRequest) |
URI |
discoverEndpoint(String key,
AmazonWebServiceRequest request,
boolean required,
URI defaultEndpoint) |
void |
evict(String key) |
abstract URI |
get(K key,
AmazonWebServiceRequest discoveryRequest,
boolean required,
URI defaultEndpoint)
Abstract method to be implemented by each service to handle retrieving
endpoints from a cache.
|
ScheduledFuture<?> |
loadAndScheduleEvict(String key,
long refreshPeriod,
TimeUnit refreshPeriodTimeUnit) |
ScheduledFuture<URI> |
loadAndScheduleRefresh(String key,
AmazonWebServiceRequest request,
long refreshPeriod,
URI defaultEndpoint) |
abstract URI |
put(String key,
AmazonWebServiceRequest discoveryRequest,
Map<String,String> endpointDetails,
URI defaultEndpoint)
Abstract method to be implemented by each service to handle storing endpoints
in it's cache.
|
void |
shutdown() |
public EndpointDiscoveryIdentifiersRefreshCache(EndpointDiscoveryCacheLoader cacheLoader)
public abstract URI get(K key, AmazonWebServiceRequest discoveryRequest, boolean required, URI defaultEndpoint)
key
- - The cache key to usediscoveryRequest
- - An endpoint discovery request containing additional discovery parametersrequired
- - Whether or not the service requires use of endpoint discoverydefaultEndpoint
- - The default endpoint for the servicepublic abstract URI put(String key, AmazonWebServiceRequest discoveryRequest, Map<String,String> endpointDetails, URI defaultEndpoint)
key
- - The cache keydiscoveryRequest
- An endpoint discovery request containing additional discovery parameters.endpointDetails
- - The details for an endpoint including the address and cache period.public abstract String constructKey(String key, AmazonWebServiceRequest discoveryRequest)
public void evict(String key)
public URI discoverEndpoint(String key, AmazonWebServiceRequest request, boolean required, URI defaultEndpoint)
public ScheduledFuture<URI> loadAndScheduleRefresh(String key, AmazonWebServiceRequest request, long refreshPeriod, URI defaultEndpoint)
public ScheduledFuture<?> loadAndScheduleEvict(String key, long refreshPeriod, TimeUnit refreshPeriodTimeUnit)
public void shutdown()