Package org.gcube.common.clients.cache
Interface EndpointCache<A>
- Type Parameters:
A- the type of service addresses
- All Known Implementing Classes:
DefaultEndpointCache
public interface EndpointCache<A>
A cross-service cache of endpoint addresses used by
DiscoveryDelegates.- Author:
- Fabio Simeoni
- See Also:
-
Method Summary
-
Method Details
-
clear
Resets the cache for a givenKey.- Parameters:
key- the key- Throws:
IllegalArgumentException- if the key isnull
-
get
Returns the address cached for a givenKey- Parameters:
key- the key- Returns:
- the endpoint address, or
nullif there is no endpoint address cached for the service - Throws:
IllegalArgumentException- if the key isnull
-
put
Caches an endpoint address for a givenKey- Parameters:
key- the keyaddress- the address- Throws:
IllegalArgumentException- if the key or the address arenull
-