Package org.eclipse.rdf4j.federated.cache

## Class CacheUtils

- java.lang.Object
- - org.eclipse.rdf4j.federated.cache.CacheUtils

-     public class CacheUtils
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CacheUtils()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `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.
    `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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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