Package org.apache.storm.grouping

# Class PartialKeyGrouping.BalancedTargetSelector

java.lang.Object
org.apache.storm.grouping.PartialKeyGrouping.BalancedTargetSelector

All Implemented Interfaces:
  `Serializable`, `PartialKeyGrouping.TargetSelector`

Enclosing class:
  PartialKeyGrouping

public static class PartialKeyGrouping.BalancedTargetSelector extends Object implements PartialKeyGrouping.TargetSelector
A basic implementation of target selection. This strategy chooses the task within the assignment that has received the fewest Tuples overall from this instance of the grouping.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BalancedTargetSelector()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Integer`
  `chooseTask(int[] assignedTasks)`
  Chooses one of the incoming tasks and selects the one that has been selected the fewest times so far.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### BalancedTargetSelector

    public BalancedTargetSelector()

- ## Method Details

  - ### chooseTask

    public Integer chooseTask(int[] assignedTasks)
    Chooses one of the incoming tasks and selects the one that has been selected the fewest times so far.
    Specified by:
      `chooseTask` in interface `PartialKeyGrouping.TargetSelector`