Class RootServicesCache
- java.lang.Object
-
- com.sodius.oslc.client.requests.cache.RootServicesCache
-
- All Implemented Interfaces:
ResourceCache<URI>
public class RootServicesCache extends Object implements ResourceCache<URI>
A cache holding Root Services resources.- Since:
- 1.11.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RootServicesCache
getInstance()
Returns the cache singleton instanceRootServices
getRootServices(URI uri)
Loads on demand the root services resource.void
invalidate(URI uri)
Discards any cached value for keykey
.void
invalidateAll()
Discards all entries in the cache.void
update(URI uri, RootServices rootServices)
Updates the cache with a new version of a root services document.
-
-
-
Method Detail
-
getInstance
public static RootServicesCache getInstance()
Returns the cache singleton instance- Returns:
- the cache shared instance.
-
invalidate
public void invalidate(URI uri)
Description copied from interface:ResourceCache
Discards any cached value for keykey
.- Specified by:
invalidate
in interfaceResourceCache<URI>
- Parameters:
uri
- the key to remove in the cache.
-
invalidateAll
public void invalidateAll()
Description copied from interface:ResourceCache
Discards all entries in the cache.- Specified by:
invalidateAll
in interfaceResourceCache<URI>
-
update
public void update(URI uri, RootServices rootServices)
Updates the cache with a new version of a root services document.This method should not need to be called in regular flows. It is automatically called when a resource is obtained using
GetRootServices
.- Parameters:
uri
- the root services URIrootServices
- the root services resource- Since:
- 3.1.0
-
getRootServices
public RootServices getRootServices(URI uri)
Loads on demand the root services resource.- Parameters:
uri
- the root services URI- Returns:
- the root services
-
-