Interface KeyGroupPartitionedPriorityQueue.PartitionQueueSetFactory<T,​PQS extends InternalPriorityQueue<T> & HeapPriorityQueueElement>

    • Method Detail

      • create

        @Nonnull
        PQS create​(@Nonnegative
                   int keyGroupId,
                   @Nonnegative
                   int numKeyGroups,
                   @Nonnull
                   KeyExtractorFunction<T> keyExtractorFunction,
                   @Nonnull
                   PriorityComparator<T> elementPriorityComparator)
        Creates a new queue for a given key-group partition.
        Parameters:
        keyGroupId - the key-group of the elements managed by the produced queue.
        numKeyGroups - the total number of key-groups in the job.
        elementPriorityComparator - the comparator that determines the order of managed elements by priority.
        Returns:
        a new queue for the given key-group.