optaplanner-core/src/main/java/org/optaplanner/core/impl/partitionedsearch/queue/PartitionQueue.java
public void addFinish(int partIndex, long partCalculationCount) {
        long eventIndex = nextEventIndexMap.get(partIndex).getAndIncrement();
        PartitionChangedEvent<Solution_> event = new PartitionChangedEvent<>(
                partIndex, eventIndex, partCalculationCount);
        queue.add(event);
    }
public void addFinish(int partIndex, long partCalculationCount) {
        long eventIndex = nextEventIndexMap.get(partIndex).getAndIncrement();
        PartitionChangedEvent<Solution_> event = new PartitionChangedEvent<>(
                partIndex, eventIndex, partCalculationCount);
        queue.add(event);
    }
This method is thread-safe.
The previous move for this partIndex (that haven't been consumed yet), will still be returned during iteration.
@param partIndex {@code 0 <= partIndex < partCount}
@param partCalculationCount at least 0
@see BlockingQueue#add(Object)