T
- concrete type of ApplicationContainerContext
created by this factory@InterfaceStability.Evolving public interface ApplicationContainerContextFactory<T extends ApplicationContainerContext> extends java.io.Serializable
ApplicationContainerContext
instances for a SamzaApplication
during
container initialization.
Use ApplicationDescriptor.withApplicationContainerContextFactory(org.apache.samza.context.ApplicationContainerContextFactory<?>)
to provide the
ApplicationContainerContextFactory
. Use Context.getApplicationContainerContext()
to get the created
ApplicationContainerContext
instance for the current container.
The ApplicationContainerContextFactory
implementation must be Serializable
.
Modifier and Type | Method and Description |
---|---|
default T |
create(ExternalContext externalContext,
JobContext jobContext,
ContainerContext containerContext)
Creates an instance of the application-defined
ApplicationContainerContext . |
default T |
create(JobContext jobContext,
ContainerContext containerContext)
Deprecated.
|
default T create(ExternalContext externalContext, JobContext jobContext, ContainerContext containerContext)
ApplicationContainerContext
.
Applications should implement this to provide a context for container initialization.
externalContext
- external context provided for the application; null if it was not providedjobContext
- framework-provided job contextcontainerContext
- framework-provided container contextApplicationContainerContext
@Deprecated default T create(JobContext jobContext, ContainerContext containerContext)
create(ExternalContext, JobContext, ContainerContext)
instead.
This is the same as create(ExternalContext, JobContext, ContainerContext)
, except it does not provide
access to external context.
This is being left here for backwards compatibility.
jobContext
- framework-provided job contextcontainerContext
- framework-provided container contextApplicationContainerContext
Deprecated: Applications should implement create(ExternalContext, JobContext, ContainerContext)
directly.
This is being left here for backwards compatibility.