Package org.eclipse.rdf4j.federated.optimizer

## Class LimitOptimizer

- java.lang.Object
- - org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor<OptimizationException>
  - - org.eclipse.rdf4j.federated.optimizer.LimitOptimizer

- All Implemented Interfaces:
    `FedXOptimizer`, `QueryModelVisitor<OptimizationException>`

      public class LimitOptimizer
      extends AbstractQueryModelVisitor<OptimizationException>
      implements FedXOptimizer

  An optimizer that attempts to push upper limits into BGPs of the query. Currently upper limits are only pushed for simple queries consisting of a single BGP.
  Author:
    Andreas Schwarte

- - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `meet​(Projection proj)` |
    `void` | `meet​(Slice node)` |
    `void` | `meetOther​(QueryModelNode node)` |
    `void` | `optimize​(TupleExpr tupleExpr)` | Optimize the provided tuple expression
    `protected void` | `pushLimit​(FedXStatementPattern stmt, long upperLimit)` |

    - ### Methods inherited from class org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor

      `meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meetBinaryTupleOperator, meetBinaryValueOperator, meetCompareSubQueryValueOperator, meetNAryValueOperator, meetNode, meetSubQueryValueOperator, meetUnaryTupleOperator, meetUnaryValueOperator, meetUpdateExpr`

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

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

- - ### Constructor Detail

    - #### LimitOptimizer

          public LimitOptimizer()

  - ### Method Detail

    - #### optimize

          public void optimize​(TupleExpr tupleExpr)

      Description copied from interface: `FedXOptimizer`
      Optimize the provided tuple expression
      Specified by:
        `optimize` in interface `FedXOptimizer`

    - #### meetOther

          public void meetOther​(QueryModelNode node)
                         throws OptimizationException

      Specified by:
        `meetOther` in interface `QueryModelVisitor<OptimizationException>`
      Overrides:
        `meetOther` in class `AbstractQueryModelVisitor<OptimizationException>`
      Throws:
        `OptimizationException`

    - #### meet

          public void meet​(Slice node)
                    throws OptimizationException

      Specified by:
        `meet` in interface `QueryModelVisitor<OptimizationException>`
      Overrides:
        `meet` in class `AbstractQueryModelVisitor<OptimizationException>`
      Throws:
        `OptimizationException`

    - #### meet

          public void meet​(Projection proj)
                    throws OptimizationException

      Specified by:
        `meet` in interface `QueryModelVisitor<OptimizationException>`
      Overrides:
        `meet` in class `AbstractQueryModelVisitor<OptimizationException>`
      Throws:
        `OptimizationException`

    - #### pushLimit

          protected void pushLimit​(FedXStatementPattern stmt,
                                   long upperLimit)