Class CoordinationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.krabka.streams.coordination.CoordinationException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
FencedException
Reports a coordination failure.
This is the module's unchecked exception type. The record codec throws it for a
malformed key or value and for a name that breaks its bounds. LeaseConfig
throws it for a set of timings that cannot work together. The transport throws it
for a broker call that fails. FencedException is the one subclass, and it
reports the single failure a caller must treat as the end of a leadership.
The message text names the record part or the field that failed, so a failure identifies itself without a debugger.
Example
assertThatThrownBy(() -> Role.of(""))
.isInstanceOf(CoordinationException.class)
.hasMessage("a coordination role must not be empty");
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCoordinationException(String message) Creates an exception with a message.CoordinationException(String message, Throwable cause) Creates an exception with a message and a cause. -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CoordinationException
Creates an exception with a message.- Parameters:
message- a description of the failure
-
CoordinationException
-