org.apache.lucene.benchmark.byTask.tasks

## Class TaskSequence

- java.lang.Object
- - org.apache.lucene.benchmark.byTask.tasks.PerfTask
  - - org.apache.lucene.benchmark.byTask.tasks.TaskSequence

- All Implemented Interfaces:
    java.lang.Cloneable

      public class TaskSequence
      extends PerfTask

  Sequence of parallel or sequential tasks.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `REPEAT_EXHAUST`

    - ### Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask

      `logStep, NEW_LINE, params`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TaskSequence(PerfRunData runData, java.lang.String name, TaskSequence parent, boolean parallel)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addTask(PerfTask task)`
    `protected java.lang.Object` | `clone()`
    `void` | `close()`
    `int` | `doLogic()` Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
    `java.lang.String` | `getName()`
    `TaskSequence` | `getParent()`
    `int` | `getRate()` Returns the rate per minute: how many operations should be performed in a minute.
    `int` | `getRepetitions()`
    `java.util.ArrayList` | `getTasks()`
    `boolean` | `isCollapsable()` Return true if can be collapsed in case it is outermost sequence
    `boolean` | `isParallel()`
    `void` | `setNoChildReport()` Execute child tasks in a way that they do not report their time separately.
    `void` | `setRate(int rate, boolean perMin)`
    `void` | `setRepetitions(int repetitions)`
    `void` | `setRunTime(double sec)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask

      `getDepth, getLogMessage, getParams, getRunData, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setup, shouldNeverLogAtStart, shouldNotRecordStats, supportsParams, tearDown`

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

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

- - ### Field Detail

    - #### REPEAT_EXHAUST

          public static int REPEAT_EXHAUST

  - ### Constructor Detail

    - #### TaskSequence

          public TaskSequence(PerfRunData runData,
                              java.lang.String name,
                              TaskSequence parent,
                              boolean parallel)

  - ### Method Detail

    - #### close

          public void close()
                     throws java.lang.Exception

      Overrides:
        `close` in class `PerfTask`
      Throws:
        `java.lang.Exception`

    - #### isParallel

          public boolean isParallel()

      Returns:
        Returns the parallel.

    - #### getRepetitions

          public int getRepetitions()

      Returns:
        Returns the repetitions.

    - #### setRunTime

          public void setRunTime(double sec)
                          throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### setRepetitions

          public void setRepetitions(int repetitions)
                              throws java.lang.Exception

      Parameters:
        `repetitions` - The repetitions to set.
      Throws:
        `java.lang.Exception`

    - #### getParent

          public TaskSequence getParent()

      Returns:
        Returns the parent.

    - #### doLogic

          public int doLogic()
                      throws java.lang.Exception

      Description copied from class: `PerfTask`
      Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.
      Specified by:
        `doLogic` in class `PerfTask`
      Returns:
        number of work items done by this task.
      Throws:
        `java.lang.Exception`

    - #### addTask

          public void addTask(PerfTask task)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `PerfTask`

    - #### setNoChildReport

          public void setNoChildReport()

      Execute child tasks in a way that they do not report their time separately.

    - #### getRate

          public int getRate()

      Returns the rate per minute: how many operations should be performed in a minute. If 0 this has no effect.
      Returns:
        the rate per min: how many operations should be performed in a minute.

    - #### setRate

          public void setRate(int rate,
                              boolean perMin)

      Parameters:
        `rate` - The rate to set.

    - #### getName

          public java.lang.String getName()

      Overrides:
        `getName` in class `PerfTask`
      Returns:
        Returns the name.

    - #### getTasks

          public java.util.ArrayList getTasks()

      Returns:
        Returns the tasks.

    - #### clone

          protected java.lang.Object clone()
                                    throws java.lang.CloneNotSupportedException

      Overrides:
        `clone` in class `PerfTask`
      Throws:
        `java.lang.CloneNotSupportedException`

    - #### isCollapsable

          public boolean isCollapsable()

      Return true if can be collapsed in case it is outermost sequence

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.