@InterfaceAudience.Private public interface LockStatus
Modifier and Type | Method and Description |
---|---|
Procedure<?> |
getExclusiveLockOwnerProcedure()
Get the procedure which holds the exclusive lock.
|
default long |
getExclusiveLockProcIdOwner()
Return the id of the procedure which holds the exclusive lock, if exists.
|
int |
getSharedLockCount()
Get the number of procedures which hold the shared lock.
|
boolean |
hasExclusiveLock()
Whether the exclusive lock has been held.
|
boolean |
hasLockAccess(Procedure<?> proc)
Return true if the procedure itself holds the exclusive lock, or any ancestors of the give
procedure hold the exclusive lock.
|
default boolean |
isLocked()
Return whether this lock has already been held,
Notice that, holding the exclusive lock or shared lock are both considered as locked, i.e, this
method usually equals to
hasExclusiveLock() || getSharedLockCount() > 0 . |
default boolean isLocked()
hasExclusiveLock() || getSharedLockCount() > 0
.boolean hasExclusiveLock()
boolean hasLockAccess(Procedure<?> proc)
Procedure<?> getExclusiveLockOwnerProcedure()
default long getExclusiveLockProcIdOwner()
int getSharedLockCount()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.