@Override
    public String toString() {
      return "DrainState: [Tasks : "
          + tasks
          + ", isDrained : "
          + drained
          + "]";
    }
This class tracks the drain state for streams in a task. Internally it keeps track of Drain messages received
from upstream tasks for each system stream partition (ssp). If messages have been received from all tasks,
it will mark the ssp as drained. For a stream to be drained, all its partitions assigned to
the task need to be drained.

This class is thread-safe.
samza-core/src/main/java/org/apache/samza/operators/impl/DrainStates.java