public interface ApplicationTaskContext
ApplicationTaskContextinstance can be used for holding per-task runtime state and objects and managing their lifecycle in an
ApplicationDescriptor.withApplicationTaskContextFactory(org.apache.samza.context.ApplicationTaskContextFactory<?>) to provide the
Context.getApplicationTaskContext() to get the created
ApplicationTaskContext instance for the current task.
A unique instance of
ApplicationTaskContext is created for each task in a container. Use the
ApplicationTaskContextFactory to create any runtime state and objects, and the
stop() methods to manage their lifecycle.
ApplicationTaskContextFactory, an implementation does not need to be
|Modifier and Type||Method and Description|
ApplicationTaskContextafter its task is initialized but before any messages are processed.
If this throws an exception, the container will fail to start.
ApplicationTaskContextafter processing ends but before its task is closed.
If this throws an exception, the container will fail to fully shut down.