Interface ServiceFailurePolicy
- Since:
- Coherence 3.5
- Author:
- rhl
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onGuardableRecovery
(Guardable guardable, Service service) Take appropriate action after the specified guardable (associated with the specified service) has missed a "soft-timeout" and has entered the "RECOVERY" state.void
onGuardableTerminate
(Guardable guardable, Service service) Take appropriate action after the specified guardable (associated with the specified service) has missed a "hard-timeout" and has entered the "TERMINATING" state.void
onServiceFailed
(Cluster cluster) Take appropriate action after some service failed to stop.
-
Method Details
-
onGuardableRecovery
Take appropriate action after the specified guardable (associated with the specified service) has missed a "soft-timeout" and has entered the "RECOVERY" state.This method will be invoked on a dedicated thread; further failures, hangs or deadlocks of recovery handling logic will not directly affect other healthy service threads.
Note: in general, implementations should call the
Guardable.recover()
method on the specified guardable- Parameters:
guardable
- the guardable that entered the RECOVERY stateservice
- the service that the guardable is associated with- Since:
- Coherence 3.6
-
onGuardableTerminate
Take appropriate action after the specified guardable (associated with the specified service) has missed a "hard-timeout" and has entered the "TERMINATING" state.This method will be invoked on a dedicated thread; further failures, hangs or deadlocks of termination handling logic will not directly affect other healthy service threads.
Note: in general, implementations should call the
Guardable.terminate()
method on the specified guardable- Parameters:
guardable
- the context that entered the TERMINATING stateservice
- the service that the guardable is associated with- Since:
- Coherence 3.6
-
onServiceFailed
Take appropriate action after some service failed to stop. The failed service may be hung, deadlocked, or otherwise in an inconsistent and/or unresponsive state.This method will be invoked on a dedicated thread; further failures, hangs, or deadlocks of failure handling logic will not directly affect other healthy service threads.
Note: it is strongly advised that, at a minimum, any failure policy should attempt to stop the cluster services (e.g. via Cluster.stop()) or otherwise ensure that they are stopped, in order to isolate any failure from the rest of the cluster.
- Parameters:
cluster
- the cluster
-