Andrey Gura, Why should we have any FailureHandler abstraction? We already have it - this is EventListener. In my view it is better (and cleaner design) to add events (similar to, for example, org.apache.ignite.events.EventType#EVT_NODE_SEGMENTED) like EVT_IGNITE_OOME, EVT_SYS_WORKER_FAILED and fire events accordingly to the situation + execute configured system logic. We have exactly same way with segmentation. We have policy which defines how system reacts and also allow user to add event listeners.
For better understanding please take a look at org.apache.ignite.plugin.segmentation.SegmentationPolicy and org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.DiscoveryWorker#onSegmentation. Discovery manager records the event (allowing user to get notification on it) and executes internal logic in case segmentation policy is not NOOP. Thanks! --Yakov