advancedIdempotency in Distributed Systems
Give an example of an operation that is idempotent and one that isn't.
setStatus(SHIPPED) is idempotent — calling it repeatedly always leaves the status as SHIPPED. incrementStock(-1) is NOT — calling it twice decrements stock twice, producing a different end result than calling it once.
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full Spring Ecosystem Mastery library.
Give an example of an operation that is idempotent and one that isn't.