Class SearchStreamResults<T>

java.lang.Object
com.atlassian.jira.issue.search.SearchStreamResults<T>
All Implemented Interfaces:
AutoCloseable

@PublicApi public class SearchStreamResults<T> extends Object implements AutoCloseable
Search results, similar to SearchResults, but as a Stream, thus memory efficient for iterating a large number of results.

Make sure to close either this object, or the stream(), after you're done. We recommend using a try-with-resource-block.

Since:
10.6
  • Constructor Details

    • SearchStreamResults

      public SearchStreamResults(Stream<T> stream)
  • Method Details

    • stream

      public Stream<T> stream()
    • close

      public void close()
      Closes the stream(), which releases resources held in the underlying search platforms. You can no longer use the stream after it's closed.
      Specified by:
      close in interface AutoCloseable