github.com/rohankumardubey/proxyfs@v0.0.0-20210108201508-653efa9ab00e/pfsagentd/LockManagementWithExclusiveLease.uml (about) 1 @startuml 2 3 scale 800 width 4 5 state None : No locks held 6 state SharedLockGranted: One or more SharedLocks held 7 state ExclusiveLockGranted : One ExclusiveLock held 8 state SharedLockGrantedExclusiveLockRequested : While SharedLock held, one\nor more ExclusiveLocks requested 9 state ExclusiveLockGrantedLockRequested : While ExclusiveLock held,\none or more Locks requested 10 11 [*] --> None 12 13 None --> SharedLockGranted : First SharedLock request 14 None --> ExclusiveLockGranted : ExclusiveLock request 15 16 SharedLockGranted --> SharedLockGranted : Subsequent SharedLock request 17 SharedLockGranted --> SharedLockGranted : Non-last SharedLock release 18 SharedLockGranted --> None : Last SharedLock release 19 20 SharedLockGranted --> SharedLockGrantedExclusiveLockRequested : ExclusiveLock request 21 22 SharedLockGrantedExclusiveLockRequested --> SharedLockGrantedExclusiveLockRequested : Lock request 23 SharedLockGrantedExclusiveLockRequested --> SharedLockGrantedExclusiveLockRequested : Non-last SharedLock release 24 SharedLockGrantedExclusiveLockRequested --> ExclusiveLockGranted : Last SharedLock release &\nonly ExclusiveLock request pending 25 SharedLockGrantedExclusiveLockRequested --> ExclusiveLockGrantedLockRequested : Last SharedLock release &\nmultiple Lock requests pending 26 27 ExclusiveLockGranted --> None : ExclusiveLock release 28 29 ExclusiveLockGranted --> ExclusiveLockGrantedLockRequested : Lock request 30 31 ExclusiveLockGrantedLockRequested --> SharedLockGranted : ExclusiveLock release & only\nSharedLock requests pending 32 ExclusiveLockGrantedLockRequested --> ExclusiveLockGranted : ExclusiveLock release & only\nsingle ExclusiveLock request pending 33 ExclusiveLockGrantedLockRequested --> SharedLockGrantedExclusiveLockRequested : ExclusiveLock release & one or\nmore SharedLock before ExclusiveLock pending 34 ExclusiveLockGrantedLockRequested --> ExclusiveLockGrantedLockRequested : ExclusiveLock release & more than just\nsingle ExclusiveLock request pending 35 36 @enduml