public interface IWorkerHook extends Serializable
An IWorkerHook represents a topology component that can be executed when a worker starts, and when a worker shuts down. It can be useful when you want to execute operations before topology processing starts, or cleanup operations before your workers shut down.
Modifier and Type | Method and Description |
---|---|
void |
shutdown()
This method is called right before a worker shuts down
|
void |
start(Map stormConf,
WorkerTopologyContext context)
This method is called when a worker is started
|
void start(Map stormConf, WorkerTopologyContext context)
This method is called when a worker is started
stormConf
- The Storm configuration for this workercontext
- This object can be used to get information about this worker’s place within the topologyvoid shutdown()
This method is called right before a worker shuts down
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.