Apama 10.3.1 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in EPL | Defining Monitors | About monitor contents | Unloading monitors from the correlator
 
Unloading monitors from the correlator
The correlator unloads a monitor in the following situations:
*All of the monitor's instances have terminated.
*An external request kills the monitor. This kills any instances of the monitor.
If the monitor defines an onunload() action, the correlator executes it just before it unloads the monitor. You cannot spawn in an onunload() action.
If an owning monitor has an internal event type, it is possible for another dependent monitor to hold an instance of that internal event type in a variable of the any type (see the description of the any type in the API Reference for EPL (ApamaDoc) ) if the owning monitor has sent or routed an instance of the monitor-internal event. In this case, a monitor is not completely unloaded, even if all of its monitors have terminated, because another monitor still depends on one of the monitor-internal types. The monitor name will stay in the correlator, but there will be no monitor instances running. The onunload() action, if defined, still executes when the last monitor instance is terminated. The monitor is not automatically deleted in this case. The monitor name needs to be explicitly deleted with the engine_delete tool or by using the client API, which can only be done if the monitors that are dependent on the internal type are either no longer dependent or have been deleted themselves. See also Deleting code from a correlator.

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.