Class AbstractNoSplitList<E>

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
org.postgresql.pljava.internal.AbstractNoSplitList<E>
All Implemented Interfaces:
Iterable<E>, Collection<E>, List<E>, SequencedCollection<E>
Direct Known Subclasses:
TupleList.Empty, TupleList.SPI

public abstract class AbstractNoSplitList<E> extends AbstractList<E>
An AbstractList whose parallelStream method returns a sequential stream (a behavior the spec does allow), and whose spliterator method returns a Spliterator that never splits.

In interfacing with the single-threaded PostgreSQL backend, there are many uses for a class with the behavior of List but that does not invite unintended parallelism through the stream API.

  • Constructor Details

    • AbstractNoSplitList

      public AbstractNoSplitList()
  • Method Details

    • parallelStream

      public Stream<E> parallelStream()
      "It is allowable" (and, in this case, inevitable) for this method to return a sequential stream.
    • spliterator

      public Spliterator<E> spliterator()
      Returns a Spliterator that never splits.