Interface DataStream<D>

Type Parameters:
D - Type of data provided by this stream.

public interface DataStream<D>
A data stream providing continuous access to fitting data objects.
Results are expected to be issued in an incremental way enabling continuous retrieval.
Since:
5.2.5
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Signals the stream to close, i.e., to stop any data processing and free resources.
    @NotNull List<D>
    getNext(int count)
    Returns an incremental result set of data objects based on the settings provided when starting the stream.
    int
    Returns the total number of entries that are available by this stream.
    boolean
    Returns true, if the stream holds further entries in readiness.
  • Method Details

    • getNext

      @NotNull @NotNull List<D> getNext(int count)
      Returns an incremental result set of data objects based on the settings provided when starting the stream. The returned result set contains at most count unique entries.
      Parameters:
      count - The requested number of entries.
      Returns:
      A List of data entries.
      Since:
      5.2.5
    • hasNext

      boolean hasNext()
      Returns true, if the stream holds further entries in readiness. If there are no further entries to be returned, this returns false.
      Attention: This call should return very fast.
      Returns:
      true if the stream still has more entries to deliver, false otherwise.
      Since:
      5.2.5
    • getTotal

      int getTotal()
      Returns the total number of entries that are available by this stream. May return -1, if the stream cannot (yet) provide the total number.
      Attention: This call should return very fast.
      Returns:
      Total number of entries or -1.
      Since:
      5.2.5
    • close

      void close()
      Signals the stream to close, i.e., to stop any data processing and free resources.
      Since:
      5.2.5