Class CacheUtils
java.lang.Object
org.eclipse.rdf4j.federated.cache.CacheUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<StatementSource>
checkCacheForStatementSourcesUpdateCache
(SourceSelectionCache cache, List<Endpoint> endpoints, Resource subj, IRI pred, Value obj, QueryInfo queryInfo, Resource... contexts) Checks the cache for relevant statement sources to the provided statement.static boolean
checkCacheUpdateCache
(SourceSelectionCache cache, List<Endpoint> endpoints, Resource subj, IRI pred, Value obj, QueryInfo queryInfo, Resource... contexts) Checks the cache if some endpoint can provide results to the subquery.
-
Constructor Details
-
CacheUtils
public CacheUtils()
-
-
Method Details
-
checkCacheUpdateCache
public static boolean checkCacheUpdateCache(SourceSelectionCache cache, List<Endpoint> endpoints, Resource subj, IRI pred, Value obj, QueryInfo queryInfo, Resource... contexts) Checks the cache if some endpoint can provide results to the subquery. If the cache has no knowledge a remote ask query is performed and the cache is updated with appropriate information.- Parameters:
cache
-endpoints
-subj
-pred
-obj
-queryInfo
-contexts
-- Returns:
- whether some endpoint can provide results
-
checkCacheForStatementSourcesUpdateCache
public static List<StatementSource> checkCacheForStatementSourcesUpdateCache(SourceSelectionCache cache, List<Endpoint> endpoints, Resource subj, IRI pred, Value obj, QueryInfo queryInfo, Resource... contexts) Checks the cache for relevant statement sources to the provided statement. If the cache has no knowledge ask the endpoint for further information.- Parameters:
cache
-endpoints
-subj
-pred
-obj
-queryInfo
-contexts
-- Returns:
- the list of relevant statement sources
-