public static Runnable setFailureAction(Runnable action) {
    Runnable old = SystemFailure.failureAction;
    SystemFailure.failureAction = action;
    return old;
  }
Sets a user-defined action that is run in the event that failure has been detected.
<p>
This action is run <em>after</em> the GemFire cache has been shut down. If it throws any error,
it will be reattempted indefinitely until it succeeds. This action may be dynamically modified
while the system is running.
<p>
The default action prints the failure stack trace to System.err.

@see #initiateFailure(Error)
@param action the Runnable to use
@return the previous action
geode-core/src/main/java/org/apache/geode/SystemFailure.java