public interface ApplicationContainerContext
ApplicationContainerContextinstance can be used for holding per-container runtime state and objects and managing their lifecycle. This context is shared across all tasks in the container.
ApplicationDescriptor.withApplicationContainerContextFactory(org.apache.samza.context.ApplicationContainerContextFactory<?>) to provide the
Context.getApplicationContainerContext() to get the created
ApplicationContainerContext instance for the current container.
A unique instance of
ApplicationContainerContext is created in each container. If the container moves or the
container model changes (e.g. due to failure or re-balancing), a new instance is created.
ApplicationContainerContextFactory, an implementation does not need to be
|Modifier and Type||Method and Description|
ApplicationContainerContextbefore any tasks in the container are initialized and before processing begins.
If this throws an exception, the container will fail to start.
ApplicationContainerContextafter processing ends and after all tasks in the container are closed.
If this throws an exception, the container will fail to fully shut down.