Package org.eclipse.emf.cdo
Interface CDOLock.CDOAcquiredLock
- All Superinterfaces:
AutoCloseable
- Enclosing interface:
CDOLock
- Since:
- 4.16
- Author:
- Eike Stepper
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Releases the acquired lock.getLock()Returns the lock represented by this acquired lock.Returns the object protected by this lock.Returns the owners of the lock.org.eclipse.net4j.util.concurrent.IRWLockManager.LockTypegetType()Returns the lock type.booleanisLocked()Returns whether the lock is held by the requesting view.booleanReturns whether the lock is held by another view.booleanReturns whether the lock was acquired recursively.
-
Method Details
-
getLock
CDOLock getLock()Returns the lock represented by this acquired lock.- Returns:
- the lock.
-
getObject
CDOObject getObject()Returns the object protected by this lock.- Returns:
- the locked object.
-
getType
org.eclipse.net4j.util.concurrent.IRWLockManager.LockType getType()Returns the lock type.- Returns:
- the lock type.
-
getOwners
Set<CDOLockOwner> getOwners()Returns the owners of the lock.- Returns:
- the lock owners.
-
isLocked
boolean isLocked()Returns whether the lock is held by the requesting view.- Returns:
trueif the lock is held by the requesting view.
-
isLockedByOthers
boolean isLockedByOthers()Returns whether the lock is held by another view.- Returns:
trueif another view holds the lock.
-
isRecursive
boolean isRecursive()Returns whether the lock was acquired recursively.- Returns:
trueif the lock is recursive.
-
close
void close()Releases the acquired lock.- Specified by:
closein interfaceAutoCloseable
-