Interface KeyGroupPartitionedPriorityQueue.PartitionQueueSetFactory<T,PQS extends InternalPriorityQueue<T> & HeapPriorityQueueElement>
-
- Type Parameters:
T
- type of the elements in the queue set.PQS
- type of the priority queue. Must have set semantics andHeapPriorityQueueElement
.
- Enclosing class:
- KeyGroupPartitionedPriorityQueue<T,PQ extends InternalPriorityQueue<T> & HeapPriorityQueueElement>
public static interface KeyGroupPartitionedPriorityQueue.PartitionQueueSetFactory<T,PQS extends InternalPriorityQueue<T> & HeapPriorityQueueElement>
Factory that produces the sub-queues that represent the partitions of aKeyGroupPartitionedPriorityQueue
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PQS
create(int keyGroupId, int numKeyGroups, KeyExtractorFunction<T> keyExtractorFunction, PriorityComparator<T> elementPriorityComparator)
Creates a new queue for a given key-group partition.
-
-
-
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.
-
-