Class FailureClassifier

java.lang.Object
org.openspaces.core.multicluster.internal.health.FailureClassifier

public final class FailureClassifier extends Object
Decides what a thrown exception says about the cluster, as opposed to the request.

This is the correctness crux of failover. If an application error - writing an entry whose id already exists, say - were counted as a cluster failure, a single bad call repeated in a loop would fail an entire site over. So the default is deliberately the safe one: anything not recognised as a transport or discovery failure counts as an application error and leaves cluster health untouched.

Quiesce is its own verdict: the space is alive and reachable but refusing operations, which is neither a failure to count nor a success to ignore.

Recognition walks the cause chain, because GigaSpace translates space exceptions into Spring's DataAccessException hierarchy and the transport failure ends up nested inside.

  • Method Details

    • classify

      public static FailureClassifier.Verdict classify(Throwable throwable)
      Classifies a throwable by walking its cause chain.

      Quiesce is looked for along the whole chain before anything else: the clustered router reports a quiesced primary as a RemoteException ("Failed to find an active server") with the quiesce nested inside, and that outer transport exception must not hide it.

    • isUnavailable

      public static boolean isUnavailable(Throwable throwable)
      True when this exception means "the cluster is not reachable".