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 iftryStop
value istrue
. If node can't be stopped during providedtimeout
ortryStop
value isfalse
then 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 boolean
handle(Ignite ignite, FailureContext failureCtx)
Actual failure handling.long
timeout()
Get stop node timeout.String
toString()
boolean
tryStop()
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:
handle
in 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:
toString
in classAbstractFailureHandler
-
-