Class OrderByMoveIndexBlockingQueue<Solution_>
java.lang.Object
org.optaplanner.core.impl.heuristic.thread.OrderByMoveIndexBlockingQueue<Solution_>
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddExceptionThrown(int moveThreadIndex, Throwable throwable) This method is thread-safe.voidThis 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.take()Not thread-safe. 
- 
Constructor Details
- 
OrderByMoveIndexBlockingQueue
public OrderByMoveIndexBlockingQueue(int capacity)  
 - 
 - 
Method Details
- 
startNextStep
public void startNextStep(int stepIndex) Not thread-safe. Can only be called from the solver thread.- Parameters:
 stepIndex- at least 0
 - 
addUndoableMove
public 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 < moveThreadCountstepIndex- at least 0moveIndex- at least 0move- never null- See Also:
 
 - 
addMove
public 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 < moveThreadCountstepIndex- at least 0moveIndex- at least 0move- never nullscore- never null- See Also:
 
 - 
addExceptionThrown
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 < moveThreadCountthrowable- never null
 - 
take
Not thread-safe. Can only be called from the solver thread.- Returns:
 - never null
 - Throws:
 InterruptedException- if interrupted- See Also:
 
 
 -