Interface ILifecycleHandler
Handles lifecycle events defined in LifecycleEventType. Use this interface whenever you need to plug some custom logic before or after Ignite startup and stopping routines.
There are four events you can react to:
- BeforeNodeStartInvoked before Ignite startup routine is initiated. Note that Ignite is not available during this event, therefore if you injected an Ignite instance via InstanceResourceAttribute attribute, you cannot use it yet.
- AfterNodeStartInvoked right after Ignite has started. At this point, if you injected an Ignite instance via InstanceResourceAttribute attribute, you can start using it.
- BeforeNodeStopInvoked right before Ignite stop routine is initiated. Ignite is still available at this stage, so if you injected an Ignite instance via InstanceResourceAttribute attribute, you can use it.
- AfterNodeStopInvoked right after Ignite has stopped. Note that Ignite is not available during this event.
Namespace: Apache.Ignite.Core.Lifecycle
Assembly: Apache.Ignite.Core.dll
Syntax
public interface ILifecycleHandler
Methods
OnLifecycleEvent(LifecycleEventType)
This method is called when lifecycle event occurs.
Declaration
void OnLifecycleEvent(LifecycleEventType evt)
Parameters
Type | Name | Description |
---|---|---|
LifecycleEventType | evt | Lifecycle event. |