Package org.apache.kafka.streams
Interface TaskMetadata
public interface TaskMetadata
Metadata of a task.
-
Method Summary
Modifier and Type Method Description Map<TopicPartition,Long>committedOffsets()Offsets of the source topic partitions committed so far by the task.Map<TopicPartition,Long>endOffsets()End offsets of the source topic partitions of the task.booleanequals(Object o)Compares the specified object with this TaskMetadata.inthashCode()Returns the hash code value for this TaskMetadata.TaskIdtaskId()Task ID of the task.Optional<Long>timeCurrentIdlingStarted()Time task idling started.Set<TopicPartition>topicPartitions()Source topic partitions of the task.
-
Method Details
-
taskId
TaskId taskId()Task ID of the task.- Returns:
- task ID consisting of subtopology and partition ID
-
topicPartitions
Set<TopicPartition> topicPartitions()Source topic partitions of the task.- Returns:
- source topic partitions
-
committedOffsets
Map<TopicPartition,Long> committedOffsets()Offsets of the source topic partitions committed so far by the task.- Returns:
- map from source topic partitions to committed offsets
-
endOffsets
Map<TopicPartition,Long> endOffsets()End offsets of the source topic partitions of the task.- Returns:
- map source topic partition to end offsets
-
timeCurrentIdlingStarted
Time task idling started. If the task is not currently idling it will return empty.- Returns:
- time when task idling started, empty
Optionalif the task is currently not idling
-
equals
Compares the specified object with this TaskMetadata. Returnstrueif and only if the specified object is also a TaskMetadata and bothtaskId()andtopicPartitions()are equal. -
hashCode
int hashCode()Returns the hash code value for this TaskMetadata. The hash code of a list is defined to be the result of the following calculation:Objects.hash(taskId(), topicPartitions());
-