Solution_ - the solution type, the class with the PlanningSolution annotationProblemId_ - the ID type of a submitted problem, such as Long or UUID.public interface SolverJob<Solution_,ProblemId_>
problem that has been submitted to solve on the SolverManager.| Modifier and Type | Method and Description |
|---|---|
Solution_ |
getFinalBestSolution()
Waits if necessary for the solver to complete and then returns the final best
PlanningSolution. |
ProblemId_ |
getProblemId() |
SolverStatus |
getSolverStatus()
Returns whether the
Solver is scheduled to solve, actively solving or not. |
void |
terminateEarly()
Terminates the solver or cancels the solver job if it hasn't (re)started yet.
|
ProblemId_ getProblemId()
SolverManager.solve(Object, Function, Consumer)
or SolverManager.solveAndListen(Object, Function, Consumer)SolverStatus getSolverStatus()
Solver is scheduled to solve, actively solving or not.
Returns SolverStatus.NOT_SOLVING if the solver already terminated.
void terminateEarly()
Does nothing if the solver already terminated.
Waits for the termination or cancellation to complete before returning.
During termination, a bestSolutionConsumer could still be called (on a consumer thread),
before this method returns.
Solution_ getFinalBestSolution() throws InterruptedException, ExecutionException
PlanningSolution.InterruptedException - if the current thread was interrupted while waitingExecutionException - if the computation threw an exceptionCopyright © 2006–2020 JBoss by Red Hat. All rights reserved.