Class PartitionQueue<Solution_>

    • Constructor Detail

      • PartitionQueue

        public PartitionQueue​(int partCount)
    • Method Detail

      • addMove

        public 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)
      • addFinish

        public 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)
      • addExceptionThrown

        public 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)
      • getPartsCalculationCount

        public long getPartsCalculationCount()