Jdempotent supports the following states and conditions?
unlocked - lock doesn't exist and can be locked
locked - lock exists and is used by a process to guard a write
i. typically we set a ttl on the lock according to the amount of time the write would take
ii. i.e. DB write in JTA transaction of 120 seconds would use a 120 second ttl
iii. if the lock doesn't transition to failed/committed in this time the lock is expired
expired - lock expired TTL (vm, jvm, thread error)
i. a retry can transition this from expired to locked
failed - the owning process released with error (no DB connection, etc)
i. a retry can transition this from failed to locked
committed - write process completed all work, this is an immutable state
Jdempotent supports the following states and conditions?