public interface TaskLifecycleListener
Modifier and Type | Method and Description |
---|---|
void |
afterClose(Config config,
TaskContext context)
Called after all tasks in TaskRunner are closed.
|
void |
afterInit(Config config,
TaskContext context)
Called after all tasks in TaskRunner are initialized.
|
void |
afterProcess(IncomingMessageEnvelope envelope,
Config config,
TaskContext context)
Called after a message is processed by a task.
|
void |
beforeClose(Config config,
TaskContext context)
Called before all tasks in TaskRunner are closed.
|
void |
beforeInit(Config config,
TaskContext context)
Called before all tasks in TaskRunner are initialized.
|
void |
beforeProcess(IncomingMessageEnvelope envelope,
Config config,
TaskContext context)
Called before a message is processed by a task.
|
void beforeInit(Config config, TaskContext context)
config
- Config for the Samza job.context
- TaskContext for the StreamTask that's being initialized.void afterInit(Config config, TaskContext context)
config
- Config for the Samza job.context
- TaskContext for the StreamTask that's being initialized.void beforeProcess(IncomingMessageEnvelope envelope, Config config, TaskContext context)
envelope
- The envelope to be processed by the StreamTask.config
- Config for the Samza job.context
- TaskContext for the StreamTask that's about to process a message.void afterProcess(IncomingMessageEnvelope envelope, Config config, TaskContext context)
envelope
- The envelope that was processed by the StreamTask.config
- Config for the Samza job.context
- TaskContext for the StreamTask that just processed a message.void beforeClose(Config config, TaskContext context)
config
- Config for the Samza job.context
- TaskContext for the StreamTask that's about to be shutdown.void afterClose(Config config, TaskContext context)
config
- Config for the Samza job.context
- TaskContext for the StreamTask that was just shutdown.