Package eu.vstoyanov.natsy.exception
Class NatsyConflictException
-
- All Implemented Interfaces:
-
java.io.Serializable
public final class NatsyConflictException extends NatsyServerException
An optimistic-concurrency expectation was not met.
Raised by the compare-and-swap surface -
KeyValueStore.create,update(expectedRevision),delete(key, expectedRevision),purge(key, expectedRevision)- and by a JetStream publish whose eu.vstoyanov.natsy.jetstream.PublishExpectations did not hold.A conflict is a normal outcome of a read-modify-write loop, not a fault: natsy does not log it, because the caller re-reads and retries. The server does not report the value that was actually there, so there is nothing to carry beyond the codes on NatsyServerException.
-
-
Field Summary
Fields Modifier and Type Field Description private final IntegererrorCodeprivate final IntegerapiErrorCodeprivate final Stringmessageprivate final Throwablecauseprivate final StringlocalizedMessageprivate final Array<Throwable>suppressedprivate Array<StackTraceElement>stackTrace
-
Constructor Summary
Constructors Constructor Description NatsyConflictException(String message, Integer errorCode, Integer apiErrorCode, Throwable cause)
-
Method Summary
Modifier and Type Method Description -
Methods inherited from class eu.vstoyanov.natsy.exception.NatsyServerException
getApiErrorCode, getErrorCode -
Methods inherited from class kotlin.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-