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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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