Package org.apache.ignite.failure
Class StopNodeOrHaltFailureHandler
- java.lang.Object
-
- org.apache.ignite.failure.AbstractFailureHandler
-
- org.apache.ignite.failure.StopNodeOrHaltFailureHandler
-
- All Implemented Interfaces:
FailureHandler
public class StopNodeOrHaltFailureHandler extends AbstractFailureHandler
Handler will try to stop node iftryStopvalue istrue. If node can't be stopped during providedtimeoutortryStopvalue isfalsethen JVM process will be terminated forcibly usingRuntime.getRuntime().halt().
-
-
Constructor Summary
Constructors Constructor Description StopNodeOrHaltFailureHandler()Default constructor.StopNodeOrHaltFailureHandler(boolean tryStop, long timeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanhandle(Ignite ignite, FailureContext failureCtx)Actual failure handling.longtimeout()Get stop node timeout.StringtoString()booleantryStop()Get try stop.-
Methods inherited from class org.apache.ignite.failure.AbstractFailureHandler
getIgnoredFailureTypes, onFailure, setIgnoredFailureTypes
-
-
-
-
Method Detail
-
handle
protected boolean handle(Ignite ignite, FailureContext failureCtx)
Actual failure handling. This method is not called for ignored failure types.- Specified by:
handlein classAbstractFailureHandler
-
timeout
public long timeout()
Get stop node timeout.- Returns:
- Stop node timeout.
-
tryStop
public boolean tryStop()
Get try stop.- Returns:
- Try stop.
-
toString
public String toString()
- Overrides:
toStringin classAbstractFailureHandler
-
-