上QQ阅读APP看书,第一时间看更新
ActivationListener
This optional interface enables callbacks that are somewhat similar to setup and teardown but they occur at a different point during deployment and there are a few cases where using this interface may be necessary.
- activate: This is called after the operator along with its ports was initialized (set up) and immediately before processing of tuples starts. As an example, this is a place for initialization logic that depends on the initialization of the operator ports, such as obtaining the tuple schema or other port attributes.
- deactivate: This should perform the opposite of activate.