Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
interface FailureHandler {
   FailureAction onFailure(FailureContext failureCtx);
}

class FailureContext {
   FailureType type;
   Throwable causeerror;
}

enum FailureAction {
   RESTARTTERMINATE_JVM,
   STOP_NODE,
   NOOPNO_OP;
}

enum FailureType {
   SEGMENTATION,
   SYSTEM_WORKER_TERMINATION,
   CRITICAL_ERROR
}

FailureHandler implementation will be able to handle (see FailureAction) each registered failure (see FailureContext).

DeafultFailureHandler must be initialized by default unless user provide specific implementation. DefaultFailureHandler must return STOP_NODE action for SEGMENTATION failure type and TERMINATE_JVM for the rest failures.

FailureProcessor is responsible for different failure action processing accordingly to the value returned by FailureHandler implementation.

Risks and Assumptions

// Describe project risks, such as API or binary compatibility issues, major protocol changes, etc.

...