Class CacheUtils


  • public class CacheUtils
    extends Object
    • Constructor Detail

      • CacheUtils

        public CacheUtils()
    • Method Detail

      • 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