Class SessionLock.DownwardSubtreeLockCount

  • All Implemented Interfaces:
    LockCountManager<SessionToken>
    Enclosing class:
    SessionLock

    public static class SessionLock.DownwardSubtreeLockCount
    extends SessionLock.ChildSessionIDLockCount
    A LockCountManager considering session tokens and their subsessions (but not vice versa!) as equal. This resembles SessionLock.UpwardSubtreeLockCount but differs in that additional locking sessions move a subtree downwards. This prevents sibling sessions from locking concurrently but only allows for consecutive sibling locking. Locking by parent sessions (ones lying on the way from a root to the top-level session) is allowed.
    The subtree will be locked until the last (child) session has unlocked.

    The root of a subtree will always be the locking session token with the highest child level. When locking a subtree will move downward if locked by a descendant session and it will move upward in case a current root unlocks.