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)
CustomStreamGroupingIt also tells the grouping the metadata on the stream this grouping will be used on.
prepare in interface CustomStreamGroupingpublic java.util.List<java.lang.Integer> chooseTasks(java.util.List<java.lang.Object> values)
CustomStreamGroupingchooseTasks in interface CustomStreamGroupingvalues - the values to group on