org.eclipse.rdf4j.query.algebra.evaluation.limited.iterator

## Class LimitedSizeIntersectIteration

- java.lang.Object
- - org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<E,X>
  - - org.eclipse.rdf4j.common.iteration.IterationWrapper<E,X>
    - - org.eclipse.rdf4j.common.iteration.FilterIteration<E,X>
      - - org.eclipse.rdf4j.common.iteration.IntersectIteration<BindingSet,QueryEvaluationException>
        - - org.eclipse.rdf4j.query.algebra.evaluation.limited.iterator.LimitedSizeIntersectIteration

- All Implemented Interfaces:
    AutoCloseable, CloseableIteration<BindingSet,QueryEvaluationException>, Iteration<BindingSet,QueryEvaluationException>

      public class LimitedSizeIntersectIteration
      extends IntersectIteration<BindingSet,QueryEvaluationException>

  Author:
    Jerven Bolleman, SIB Swiss Institute of Bioinformatics

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.rdf4j.common.iteration.IntersectIteration

      `arg2`

    - ### Fields inherited from class org.eclipse.rdf4j.common.iteration.IterationWrapper

      `wrappedIter`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LimitedSizeIntersectIteration(Iteration<? extends BindingSet,? extends QueryEvaluationException> arg1, Iteration<? extends BindingSet,? extends QueryEvaluationException> arg2, AtomicLong used, long maxSize)` Creates a new IntersectIteration that returns the intersection of the results of two Iterations.
    `LimitedSizeIntersectIteration(Iteration<? extends BindingSet,? extends QueryEvaluationException> arg1, Iteration<? extends BindingSet,? extends QueryEvaluationException> arg2, boolean distinct, AtomicLong used, long maxSize)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Set<BindingSet>` | `addSecondSet(Iteration<? extends BindingSet,? extends QueryEvaluationException> arg2, Set<BindingSet> set)`
    `protected void` | `handleClose()` After closing the set is cleared and any "used" capacity for collections is returned.

    - ### Methods inherited from class org.eclipse.rdf4j.common.iteration.IntersectIteration

      `accept, clearIncludeSet, inIncludeSet, makeSet, removeFromIncludeSet`

    - ### Methods inherited from class org.eclipse.rdf4j.common.iteration.FilterIteration

      `hasNext, next`

    - ### Methods inherited from class org.eclipse.rdf4j.common.iteration.IterationWrapper

      `remove`

    - ### Methods inherited from class org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration

      `close, isClosed`

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

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

    - ### Methods inherited from interface org.eclipse.rdf4j.common.iteration.Iteration

      `stream`

- - ### Constructor Detail

    - #### LimitedSizeIntersectIteration

          public LimitedSizeIntersectIteration(Iteration<? extends BindingSet,? extends QueryEvaluationException> arg1,
                                               Iteration<? extends BindingSet,? extends QueryEvaluationException> arg2,
                                               AtomicLong used,
                                               long maxSize)

      Creates a new IntersectIteration that returns the intersection of the results of two Iterations. By default, duplicates are not filtered from the results.
      Parameters:
        `arg1` - An Iteration containing the first set of elements.
        `arg2` - An Iteration containing the second set of elements.
        `used` - An atomic long used to monitor how many elements are in the set collections.
        `maxSize` - Maximum size allowed by the sum of all collections used by the LimitedSizeQueryEvaluatlion.

    - #### LimitedSizeIntersectIteration

          public LimitedSizeIntersectIteration(Iteration<? extends BindingSet,? extends QueryEvaluationException> arg1,
                                               Iteration<? extends BindingSet,? extends QueryEvaluationException> arg2,
                                               boolean distinct,
                                               AtomicLong used,
                                               long maxSize)

  - ### Method Detail

    - #### addSecondSet

          public Set<BindingSet> addSecondSet(Iteration<? extends BindingSet,? extends QueryEvaluationException> arg2,
                                              Set<BindingSet> set)
                                       throws QueryEvaluationException

      Overrides:
        `addSecondSet` in class `IntersectIteration<BindingSet,QueryEvaluationException>`
      Throws:
        `QueryEvaluationException`

    - #### handleClose

          protected void handleClose()
                              throws QueryEvaluationException

      After closing the set is cleared and any "used" capacity for collections is returned.
      Overrides:
        `handleClose` in class `IntersectIteration<BindingSet,QueryEvaluationException>`
      Throws:
        `QueryEvaluationException`

Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.