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 int
partition
The ID of the partition.int
topicGroupId
The 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 int
compareTo(TaskId other)
boolean
equals(Object o)
int
hashCode()
static TaskId
parse(String taskIdStr)
static TaskId
readFrom(DataInputStream in)
static TaskId
readFrom(ByteBuffer buf)
String
toString()
void
writeTo(DataOutputStream out)
void
writeTo(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:
compareTo
in interfaceComparable<TaskId>
-
-