org.optaplanner.core.api.solver

## Enum SolverStatus

- java.lang.Object
- - java.lang.Enum<SolverStatus>
  - - org.optaplanner.core.api.solver.SolverStatus

- All Implemented Interfaces:
    Serializable, Comparable<SolverStatus>

      public enum SolverStatus
      extends Enum<SolverStatus>

  The status of `problem` submitted to the `SolverManager`. Retrieve this status with `SolverManager.getSolverStatus(Object)` or `SolverJob.getSolverStatus()`.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `NOT_SOLVING` The problem's solving has terminated or the problem was never submitted to the `SolverManager`.
    `SOLVING_ACTIVE` A solver thread started solving the problem, but hasn't finished yet.
    `SOLVING_SCHEDULED` No solver thread started solving this problem yet, but sooner or later a solver thread will solve it.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SolverStatus` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static SolverStatus[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### SOLVING_SCHEDULED

          public static final SolverStatus SOLVING_SCHEDULED

      No solver thread started solving this problem yet, but sooner or later a solver thread will solve it.

      For example, submitting 7 problems to a `SolverManager` with a `SolverManagerConfig.getParallelSolverCount()` of 4, puts 3 into this state for non-trivial amount of time.

      Transitions into `SOLVING_ACTIVE` (or `NOT_SOLVING` if it is `terminated early`, before it starts).

    - #### SOLVING_ACTIVE

          public static final SolverStatus SOLVING_ACTIVE

      A solver thread started solving the problem, but hasn't finished yet.

      If CPU resource are scarce and that solver thread is waiting for CPU time, the state doesn't change, it's still considered solving active.

      Transitions into `NOT_SOLVING` when terminated.

    - #### NOT_SOLVING

          public static final SolverStatus NOT_SOLVING

      The problem's solving has terminated or the problem was never submitted to the `SolverManager`. `SolverManager.getSolverStatus(Object)` cannot tell the difference, but `SolverJob.getSolverStatus()` can.

  - ### Method Detail

    - #### values

          public static SolverStatus[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (SolverStatus c : SolverStatus.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static SolverStatus valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

Copyright © 2006–2021 JBoss by Red Hat. All rights reserved.