uk.ac.starlink.table

## Class RowRunner

- java.lang.Object
- - uk.ac.starlink.table.RowRunner

-     public class RowRunner
      extends java.lang.Object

  Manages potentially parallel processing of StarTable row data.
  Since:
    5 Aug 2020

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static RowRunner` | `DEFAULT` General purpose instance; will be parallel for suitable environments.
    `static SplitPolicy` | `DFLT_POLICY` Default split policy.
    `static RowRunner` | `PARTEST` Testing instance; force parallel processing even for small tables.
    `static RowRunner` | `SEQUENTIAL` Sequential-only instance; no parallel processing.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RowRunner(SplitProcessor<?> processor)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<A> A` | `collect(RowCollector<A> collector, StarTable table)` Performs a collection operation on table rows.
    `RowSplittable` | `createRowSplittable(StarTable table)` Acquires a splittable row sequence from a table.
    `SplitProcessor<RowSplittable>` | `getSplitProcessor()` Returns the processor on which this runner is based.

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

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

- - ### Field Detail

    - #### DFLT_POLICY

          public static final SplitPolicy DFLT_POLICY

      Default split policy.

    - #### DEFAULT

          public static final RowRunner DEFAULT

      General purpose instance; will be parallel for suitable environments.

    - #### SEQUENTIAL

          public static final RowRunner SEQUENTIAL

      Sequential-only instance; no parallel processing.

    - #### PARTEST

          public static final RowRunner PARTEST

      Testing instance; force parallel processing even for small tables.

  - ### Constructor Detail

    - #### RowRunner

          public RowRunner(SplitProcessor<?> processor)

      Constructor.
      Parameters:
        `processor` - processor that manages the executions

  - ### Method Detail

    - #### collect

          public <A> A collect(RowCollector<A> collector,
                               StarTable table)
                        throws java.io.IOException

      Performs a collection operation on table rows.
      Parameters:
        `collector` - collector defining operation
        `table` - table supplying data
      Returns:
        result of collection
      Throws:
        `java.io.IOException`

    - #### createRowSplittable

          public RowSplittable createRowSplittable(StarTable table)
                                            throws java.io.IOException

      Acquires a splittable row sequence from a table. The default implementation just calls `StarTable.getRowSplittable()`, but this may be overridden if required.
      Parameters:
        `table` - input table
      Returns:
        potentially splittable row sequence
      Throws:
        `java.io.IOException`

    - #### getSplitProcessor

          public SplitProcessor<RowSplittable> getSplitProcessor()

      Returns the processor on which this runner is based.
      Returns:
        processor