Class OrderByMoveIndexBlockingQueue<Solution_>
- java.lang.Object
- 
- org.optaplanner.core.impl.heuristic.thread.OrderByMoveIndexBlockingQueue<Solution_>
 
- 
 public class OrderByMoveIndexBlockingQueue<Solution_> extends Object 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classOrderByMoveIndexBlockingQueue.MoveResult<Solution_>
 - 
Constructor SummaryConstructors Constructor Description OrderByMoveIndexBlockingQueue(int capacity)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddExceptionThrown(int moveThreadIndex, Throwable throwable)This method is thread-safe.voidaddMove(int moveThreadIndex, int stepIndex, int moveIndex, Move<Solution_> move, Score score)This method is thread-safe.voidaddUndoableMove(int moveThreadIndex, int stepIndex, int moveIndex, Move<Solution_> move)This method is thread-safe.voidstartNextStep(int stepIndex)Not thread-safe.OrderByMoveIndexBlockingQueue.MoveResult<Solution_>take()Not thread-safe.
 
- 
- 
- 
Method Detail- 
startNextSteppublic void startNextStep(int stepIndex) Not thread-safe. Can only be called from the solver thread.- Parameters:
- stepIndex- at least 0
 
 - 
addUndoableMovepublic void addUndoableMove(int moveThreadIndex, int stepIndex, int moveIndex, Move<Solution_> move)This method is thread-safe. It can be called from any move thread.- Parameters:
- moveThreadIndex-- 0 <= moveThreadIndex < moveThreadCount
- stepIndex- at least 0
- moveIndex- at least 0
- move- never null
- See Also:
- BlockingQueue.add(Object)
 
 - 
addMovepublic void addMove(int moveThreadIndex, int stepIndex, int moveIndex, Move<Solution_> move, Score score)This method is thread-safe. It can be called from any move thread.- Parameters:
- moveThreadIndex-- 0 <= moveThreadIndex < moveThreadCount
- stepIndex- at least 0
- moveIndex- at least 0
- move- never null
- score- never null
- See Also:
- BlockingQueue.add(Object)
 
 - 
addExceptionThrownpublic void addExceptionThrown(int moveThreadIndex, Throwable throwable)This method is thread-safe. It can be called from any move thread. Previous results (that haven't been consumed yet), will still be returned during iteration before the iteration throws an exception, unless there's a lower moveIndex that isn't in the queue yet.- Parameters:
- moveThreadIndex-- 0 <= moveThreadIndex < moveThreadCount
- throwable- never null
 
 - 
takepublic OrderByMoveIndexBlockingQueue.MoveResult<Solution_> take() throws InterruptedException Not thread-safe. Can only be called from the solver thread.- Returns:
- never null
- Throws:
- InterruptedException- if interrupted
- See Also:
- BlockingQueue.take()
 
 
- 
 
-