Package dk.cloudcreate.essentials.components.foundation.fencedlock
-
Interface Summary Interface Description FencedLock Represents a named fenced lock, where theFencedLock.getCurrentToken()can be passed on to down stream logic, which can keep track of the token value to identify if a timed out lock is being used to request logic.
The fence locking concept is described here https://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.htmlFencedLockEvents FencedLockManager This library provides a Distributed Locking Manager based of the Fenced Locking concept described here
TheFencedLockManageris responsible for obtaining and managing distributedFencedLock's, which are named exclusive locks.
Only oneFencedLockManagerinstance can acquire aFencedLockat a time.
The implementation has been on supporting intra-service (i.e.FencedLockStorage<UOW extends UnitOfWork,LOCK extends DBFencedLock> LockCallback -
Class Summary Class Description DBFencedLock DBFencedLockManager<UOW extends UnitOfWork,LOCK extends DBFencedLock> FencedLockEvents.FencedLockManagerStarted Is published on theLocalEventBuswhen aLifecycle.start()is called (and the lock manager isn't already started)FencedLockEvents.FencedLockManagerStopped Is published on theLocalEventBuswhen aLifecycle.stop()is called (and the lock manager isn't already stopped)FencedLockEvents.LockAcquired FencedLockEvents.LockConfirmed FencedLockEvents.LockReleased LockCallbackBuilder LockName Contains the name of aFencedLock