public class CustomStreamGroupingDelegate extends java.lang.Object implements CustomStreamGrouping
Constructor and Description |
---|
CustomStreamGroupingDelegate(CustomStreamGrouping delegate) |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.Integer> |
chooseTasks(java.util.List<java.lang.Object> values)
This function implements a custom stream grouping.
|
void |
prepare(TopologyContext context,
java.lang.String component,
java.lang.String streamId,
java.util.List<java.lang.Integer> targetTasks)
Tells the stream grouping at runtime the tasks in the target bolt.
|
public CustomStreamGroupingDelegate(CustomStreamGrouping delegate)
public void prepare(TopologyContext context, java.lang.String component, java.lang.String streamId, java.util.List<java.lang.Integer> targetTasks)
CustomStreamGrouping
It also tells the grouping the metadata on the stream this grouping will be used on.
prepare
in interface CustomStreamGrouping
public java.util.List<java.lang.Integer> chooseTasks(java.util.List<java.lang.Object> values)
CustomStreamGrouping
chooseTasks
in interface CustomStreamGrouping
values
- the values to group on