Class PartitionedGroupDeterminer
- java.lang.Object
-
- io.siddhi.core.stream.output.sink.PartitionedGroupDeterminer
-
- All Implemented Interfaces:
OutputGroupDeterminer
public class PartitionedGroupDeterminer extends Object implements OutputGroupDeterminer
This implementation ofOutputGroupDeterminergroups events into 'n' number of partitions. The events will be divided into predefined number partitions based on the value of a given field in the event. Events which are having the same value for the partitioning field will belong the to the same partition.
-
-
Constructor Summary
Constructors Constructor Description PartitionedGroupDeterminer(int partitionFieldIndex, int partitionCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdecideGroup(Event event)Deciding the group of a given event and returning a unique identifier to identify a group.
-
-
-
Method Detail
-
decideGroup
public String decideGroup(Event event)
Deciding the group of a given event and returning a unique identifier to identify a group. A correct implementation of this method should be returning the same group identifier for all events belongs a single group.- Specified by:
decideGroupin interfaceOutputGroupDeterminer- Parameters:
event- Event that needs to be decided to which group it belongs to- Returns:
- Unique Identifier to identify the group of the event
-
-