Package org.eclipse.rdf4j.query.algebra.evaluation

## Interface EvaluationStrategyFactory

- All Known Implementing Classes:
    `AbstractEvaluationStrategyFactory`, `ExtendedEvaluationStrategyFactory`, `FederationEvaluationStrategyFactory`, `StrictEvaluationStrategyFactory`

      public interface EvaluationStrategyFactory

  Factory for `EvaluationStrategy`s.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `EvaluationStrategy` | `createEvaluationStrategy​(Dataset dataset, TripleSource tripleSource, EvaluationStatistics evaluationStatistics)` | Returns the `EvaluationStrategy` to use to evaluate queries for the given `Dataset` and `TripleSource`.
    `Optional<QueryOptimizerPipeline>` | `getOptimizerPipeline()` | Get the `QueryOptimizerPipeline` that this factory will inject into the `EvaluationStrategy`, if any.
    `long` | `getQuerySolutionCacheThreshold()` | Get the number of query solutions the `EvaluationStrategy` will keep in main memory before it attempts to sync to a temporary disk cache.
    `default boolean` | `isTrackResultSize()` | Returns the status of the result size tracking for the query plan.
    `void` | `setOptimizerPipeline​(QueryOptimizerPipeline pipeline)` | Set a `QueryOptimizerPipeline` to be used for query execution planning by the `EvaluationStrategy`.
    `void` | `setQuerySolutionCacheThreshold​(long threshold)` | Set the number of query solutions the `EvaluationStrategy` will keep in main memory before it attempts to sync to a temporary disk cache.
    `default void` | `setTrackResultSize​(boolean trackResultSize)` | Enable or disable results size tracking for the query plan.

- - ### Method Detail

    - #### setQuerySolutionCacheThreshold

          void setQuerySolutionCacheThreshold​(long threshold)

      Set the number of query solutions the `EvaluationStrategy` will keep in main memory before it attempts to sync to a temporary disk cache. If set to 0, no disk caching will occur. EvaluationStrategies that provide no disk caching functionality are free to ignore this parameter.
      Parameters:
        `threshold` - the number of query solutions that the EvaluationStrategy can cache in main memory before attempting disk sync.

    - #### getQuerySolutionCacheThreshold

          long getQuerySolutionCacheThreshold()

      Get the number of query solutions the `EvaluationStrategy` will keep in main memory before it attempts to sync to a temporary disk cache. If set to 0, no disk caching will occur. EvaluationStrategies that provide no disk caching functionality are free to ignore this parameter.

    - #### setOptimizerPipeline

          void setOptimizerPipeline​(QueryOptimizerPipeline pipeline)

      Set a `QueryOptimizerPipeline` to be used for query execution planning by the `EvaluationStrategy`.
      Parameters:
        `pipeline` - a `QueryOptimizerPipeline`

    - #### getOptimizerPipeline

          Optional<QueryOptimizerPipeline> getOptimizerPipeline()

      Get the `QueryOptimizerPipeline` that this factory will inject into the `EvaluationStrategy`, if any. If no `QueryOptimizerPipeline` is defined, the `EvaluationStrategy` itself determines the pipeline.
      Returns:
        a `QueryOptimizerPipeline`, or `Optional.empty()` if no pipeline is set on this factory.

    - #### createEvaluationStrategy

          EvaluationStrategy createEvaluationStrategy​(Dataset dataset,
                                                      TripleSource tripleSource,
                                                      EvaluationStatistics evaluationStatistics)

      Returns the `EvaluationStrategy` to use to evaluate queries for the given `Dataset` and `TripleSource`.
      Parameters:
        `dataset` - the DataSet to evaluate queries against.
        `tripleSource` - the TripleSource to evaluate queries against.
        `evaluationStatistics` - the store evaluation statistics to use for query optimization.
      Returns:
        an EvaluationStrategy.

    - #### isTrackResultSize

          default boolean isTrackResultSize()

      Returns the status of the result size tracking for the query plan. Useful to determine which parts of a query plan generated the most data.
      Returns:
        true if result size tracking is enabled.

    - #### setTrackResultSize

          default void setTrackResultSize​(boolean trackResultSize)

      Enable or disable results size tracking for the query plan. Useful to determine which parts of a query plan generated the most data.
      Parameters:
        `trackResultSize` - true to enable tracking.