Class CollectingIntermediateResultElementSink

java.lang.Object
se.liu.ida.hefquin.engine.queryplan.executable.impl.CollectingIntermediateResultElementSink
All Implemented Interfaces:
IntermediateResultElementSink
Direct Known Subclasses:
CollectingIntermediateResultElementSinkWithTranslation

public class CollectingIntermediateResultElementSink extends Object implements IntermediateResultElementSink
A (thread-safe) implementation of IntermediateResultElementSink that collects all solution mappings that are sent to it. The collected solution mappings can then be accessed by calling getCollectedSolutionMappings().
  • Field Details

  • Constructor Details

    • CollectingIntermediateResultElementSink

      public CollectingIntermediateResultElementSink()
  • Method Details

    • send

      public void send(SolutionMapping element)
      Specified by:
      send in interface IntermediateResultElementSink
    • getCollectedSolutionMappings

      public Iterable<SolutionMapping> getCollectedSolutionMappings()
      Returns an iterable over the solution mappings that have been collected in this sink since the last time it was cleared (by calling clear()) or, if it has not been cleared so far, since it was created.
    • clear

      public void clear()
      Clears this sink by removing all solution mappings that have so far been collected in this sink.