RecoverableExceptionRegistry

Maps exception classes to their RecoverableType, for Class.recoverable.

Explicit registrations take precedence over the default rules (the RecoverableException marker interface, java.util.concurrent.TimeoutException). The backing store is a ConcurrentHashMap, so registration and lookup are thread-safe.

The classification is one per process, DEFAULT: it is seeded with the ServiceLoader contributions; the Spring starter exposes it as the recoverableExceptionRegistry bean and registers the RecoverableExceptionProvider beans into it. A separate instance classifies nothing Class.recoverable reads; it is for tests and tools.

See also

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Returns the registered RecoverableType for the given exception class, or null if no registration exists.

Link copied to clipboard

Lets provider register its classifications.

open override fun register(throwableClass: Class<out Throwable>, recoverableType: RecoverableType)

Registers (or overwrites) the RecoverableType for the given exception class.

Link copied to clipboard
open override fun unregister(throwableClass: Class<out Throwable>)

Removes the registration for the given exception class.