Class PartitionQueue<Solution_>
- java.lang.Object
- 
- org.optaplanner.core.impl.partitionedsearch.queue.PartitionQueue<Solution_>
 
- 
- Type Parameters:
- Solution_- the solution type, the class with the- PlanningSolutionannotation
 - All Implemented Interfaces:
- Iterable<PartitionChangeMove<Solution_>>
 
 public class PartitionQueue<Solution_> extends Object implements Iterable<PartitionChangeMove<Solution_>> This class is thread-safe.
- 
- 
Constructor SummaryConstructors Constructor Description PartitionQueue(int partCount)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddExceptionThrown(int partIndex, Throwable throwable)This method is thread-safe.voidaddFinish(int partIndex, long partCalculationCount)This method is thread-safe.voidaddMove(int partIndex, PartitionChangeMove<Solution_> move)This method is thread-safe.longgetPartsCalculationCount()Iterator<PartitionChangeMove<Solution_>>iterator()- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface java.lang.IterableforEach, spliterator
 
- 
 
- 
- 
- 
Method Detail- 
addMovepublic void addMove(int partIndex, PartitionChangeMove<Solution_> move)This method is thread-safe. The previous move(s) for this partIndex (if it hasn't been consumed yet), will be skipped during iteration.- Parameters:
- partIndex-- 0 <= partIndex < partCount
- move- never null
- See Also:
- BlockingQueue.add(Object)
 
 - 
addFinishpublic void addFinish(int partIndex, long partCalculationCount)This method is thread-safe. The previous move for this partIndex (that haven't been consumed yet), will still be returned during iteration.- Parameters:
- partIndex-- 0 <= partIndex < partCount
- partCalculationCount- at least 0
- See Also:
- BlockingQueue.add(Object)
 
 - 
addExceptionThrownpublic void addExceptionThrown(int partIndex, Throwable throwable)This method is thread-safe. The previous move for this partIndex (if it hasn't been consumed yet), will still be returned during iteration before the iteration throws an exception.- Parameters:
- partIndex-- 0 <= partIndex < partCount
- throwable- never null
- See Also:
- BlockingQueue.add(Object)
 
 - 
iteratorpublic Iterator<PartitionChangeMove<Solution_>> iterator() 
 - 
getPartsCalculationCountpublic long getPartsCalculationCount() 
 
- 
 
-