Class TaskId
- java.lang.Object
-
- org.apache.kafka.streams.processor.TaskId
-
- All Implemented Interfaces:
Comparable<TaskId>
public class TaskId extends Object implements Comparable<TaskId>
The task ID representation composed as topic group ID plus the assigned partition ID.
-
-
Field Summary
Fields Modifier and Type Field Description intpartitionThe ID of the partition.inttopicGroupIdThe ID of the topic group.
-
Constructor Summary
Constructors Constructor Description TaskId(int topicGroupId, int partition)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(TaskId other)booleanequals(Object o)inthashCode()static TaskIdparse(String taskIdStr)static TaskIdreadFrom(DataInputStream in)static TaskIdreadFrom(ByteBuffer buf)StringtoString()voidwriteTo(DataOutputStream out)voidwriteTo(ByteBuffer buf)
-
-
-
Method Detail
-
parse
public static TaskId parse(String taskIdStr)
- Throws:
TaskIdFormatException- if the taskIdStr is not a validTaskId
-
writeTo
public void writeTo(DataOutputStream out) throws IOException
- Throws:
IOException- if cannot write to output stream
-
readFrom
public static TaskId readFrom(DataInputStream in) throws IOException
- Throws:
IOException- if cannot read from input stream
-
writeTo
public void writeTo(ByteBuffer buf)
-
readFrom
public static TaskId readFrom(ByteBuffer buf)
-
compareTo
public int compareTo(TaskId other)
- Specified by:
compareToin interfaceComparable<TaskId>
-
-