Interface Task
-
- All Known Implementing Classes:
AbstractTask
,StandbyTask
,StreamTask
public interface Task
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
applicationId()
java.util.Collection<org.apache.kafka.common.TopicPartition>
changelogPartitions()
void
close(boolean clean, boolean isZombie)
void
closeSuspended(boolean clean, boolean isZombie, java.lang.RuntimeException e)
void
commit()
boolean
commitNeeded()
ProcessorContext
context()
StateStore
getStore(java.lang.String name)
boolean
hasStateStores()
TaskId
id()
boolean
initializeStateStores()
Initialize the task and returntrue
if the task is ready to run, i.e, it has not state storesvoid
initializeTopology()
java.util.Set<org.apache.kafka.common.TopicPartition>
partitions()
void
resume()
void
suspend()
ProcessorTopology
topology()
java.lang.String
toString(java.lang.String indent)
-
-
-
Method Detail
-
initializeStateStores
boolean initializeStateStores()
Initialize the task and returntrue
if the task is ready to run, i.e, it has not state stores- Returns:
- true if this task has no state stores that may need restoring.
- Throws:
java.lang.IllegalStateException
- If store gets registered after initialized is already finishedStreamsException
- if the store's change log does not contain the partition
-
commitNeeded
boolean commitNeeded()
-
initializeTopology
void initializeTopology()
-
commit
void commit()
-
suspend
void suspend()
-
resume
void resume()
-
closeSuspended
void closeSuspended(boolean clean, boolean isZombie, java.lang.RuntimeException e)
-
close
void close(boolean clean, boolean isZombie)
-
getStore
StateStore getStore(java.lang.String name)
-
applicationId
java.lang.String applicationId()
-
topology
ProcessorTopology topology()
-
context
ProcessorContext context()
-
id
TaskId id()
-
partitions
java.util.Set<org.apache.kafka.common.TopicPartition> partitions()
-
changelogPartitions
java.util.Collection<org.apache.kafka.common.TopicPartition> changelogPartitions()
- Returns:
- any changelog partitions associated with this task
-
hasStateStores
boolean hasStateStores()
-
toString
java.lang.String toString(java.lang.String indent)
-
-