public class TaskModel extends java.lang.Object implements java.lang.Comparable<TaskModel>
The hierarchy for a Samza's job data model is that jobs have containers, and containers have tasks.
| Constructor and Description |
|---|
TaskModel(TaskName taskName,
java.util.Set<SystemStreamPartition> systemStreamPartitions,
Partition changelogPartition)
Create a TaskModel for an active task with the given taskName, SSPs, and changelogPartition.
|
TaskModel(TaskName taskName,
java.util.Set<SystemStreamPartition> systemStreamPartitions,
Partition changelogPartition,
TaskMode taskMode)
Create a TaskModel for an active task with the given taskName, SSPs, and changelogPartition.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(TaskModel other) |
boolean |
equals(java.lang.Object o) |
Partition |
getChangelogPartition()
Returns the
Partition used for all changelogs for this task. |
java.util.Set<SystemStreamPartition> |
getSystemStreamPartitions()
Returns the
SystemStreamPartitions that this task is responsible for consuming. |
TaskMode |
getTaskMode() |
TaskName |
getTaskName()
Returns the name of the task.
|
int |
hashCode() |
java.lang.String |
toString() |
public TaskModel(TaskName taskName, java.util.Set<SystemStreamPartition> systemStreamPartitions, Partition changelogPartition, TaskMode taskMode)
taskName - The desired taskNamesystemStreamPartitions - SSPs assigned to this task.changelogPartition - The changelog SSP for this task.taskMode - The mode of the taskpublic TaskModel(TaskName taskName, java.util.Set<SystemStreamPartition> systemStreamPartitions, Partition changelogPartition)
taskName - The desired taskNamesystemStreamPartitions - SSPs assigned to this task.changelogPartition - The changelog SSP for this task.public TaskName getTaskName()
public java.util.Set<SystemStreamPartition> getSystemStreamPartitions()
SystemStreamPartitions that this task is responsible for consuming.SystemStreamPartitions for this taskpublic Partition getChangelogPartition()
Partition used for all changelogs for this task.public TaskMode getTaskMode()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object