T
- concrete type of ApplicationTaskContext
created by this factorypublic interface ApplicationTaskContextFactory<T extends ApplicationTaskContext>
extends java.io.Serializable
ApplicationTaskContext
instances for a SamzaApplication
during task
initialization.
Use ApplicationDescriptor.withApplicationTaskContextFactory(org.apache.samza.context.ApplicationTaskContextFactory<?>)
to provide the
ApplicationTaskContextFactory
. Use Context.getApplicationTaskContext()
to get the created
ApplicationTaskContext
instance for the current task.
The ApplicationTaskContextFactory
implementation must be Serializable
.
Modifier and Type | Method and Description |
---|---|
T |
create(JobContext jobContext,
ContainerContext containerContext,
TaskContext taskContext,
ApplicationContainerContext applicationContainerContext)
Creates an instance of the application-defined
ApplicationTaskContext . |
T create(JobContext jobContext, ContainerContext containerContext, TaskContext taskContext, ApplicationContainerContext applicationContainerContext)
ApplicationTaskContext
.jobContext
- framework-provided job contextcontainerContext
- framework-provided container contexttaskContext
- framework-provided task contextapplicationContainerContext
- application-defined container contextApplicationTaskContext