Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titleTaskId
package org.apache.kafka.streams.processor;

/**
 * A basic wrapper class for task id metadata
 */
public interface TaskIdMetadata {
    /**
     * @return The ID of the topic group, ie the subtopology that this task executes
     */
    int topicGroupId();

    /**
     * @return The ID number of the partition.
     */
    int partition();
}

...

Code Block
languagejava
titleTaskMetadata
package org.apache.kafka.streams.processor;

class TaskMetadata {

    private final TaskIdMetadata taskId;

    /**
     * @return the TaskId with additional task metadata such as partition and group id
     @Deprecated*/
    public StringTaskIdMetadata taskIdid() {
        return taskId.toString()taskIdMetadata;
    }

    /**
     * @return a string representing the TaskId metadata such as partition and group id
     * @deprecated please use {@link #id()} instead.
     */
 New   API@Deprecated
    public TaskIdMetadataString taskIdMetadatataskId() {
        return taskId.toString();
    }
}

Proposed Changes

To migrate from the String to TaskIdMetadata, we'll need to deprecate the existing getter method and add a new one.

...