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 byDiscoveryDelegates.- Author:
- Fabio Simeoni
- See Also:
Key,DiscoveryDelegate
-
-
Method Detail
-
clear
void clear(Key key) throws IllegalArgumentException
Resets the cache for a givenKey.- Parameters:
key- the key- Throws:
IllegalArgumentException- if the key isnull
-
get
A get(Key key) throws IllegalArgumentException
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
void put(Key Key, A address) throws IllegalArgumentException
Caches an endpoint address for a givenKey- Parameters:
key- the keyaddress- the address- Throws:
IllegalArgumentException- if the key or the address arenull
-
-