Package org.eclipse.emf.cdo.common.lock
Interface CDOLockState
- All Superinterfaces:
CDOBranchProvider
,CDOIDAndBranch
,CDOIdentifiable
- All Known Subinterfaces:
InternalCDOLockState
- All Known Implementing Classes:
AbstractCDOLockState
A client-side representation of all the locks on a single CDOObject.
As an individual lock is always owned by view, which in turn is owned by a session, the methods on this interface
return instances of CDOLockOwner
which carry that information.
- Since:
- 4.1
- Author:
- Caspar De Groot
- No Implement
- This interface is not intended to be implemented by clients.
- No Extend
- This interface is not intended to be extended by clients.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets a unique identifier for the object that is locked; typically aCDOID
or aCDOIDAndBranch
, depending on whether branching support is enabled or notboolean
isLocked
(org.eclipse.net4j.util.concurrent.IRWLockManager.LockType type, CDOLockOwner by, boolean others) If the 'others' argument isfalse
, this method returnstrue
if this lock is currently held by the requesting CDOView,false
otherwise.Methods inherited from interface org.eclipse.emf.cdo.common.revision.CDOIDAndBranch
getBranch
Methods inherited from interface org.eclipse.emf.cdo.common.id.CDOIdentifiable
getID
-
Field Details
-
DEPTH_NONE
static final int DEPTH_NONE- Since:
- 4.4
- See Also:
-
DEPTH_INFINITE
static final int DEPTH_INFINITE- Since:
- 4.4
- See Also:
-
-
Method Details
-
getLockedObject
Object getLockedObject()Gets a unique identifier for the object that is locked; typically aCDOID
or aCDOIDAndBranch
, depending on whether branching support is enabled or not- Returns:
- the identifier
-
isLocked
boolean isLocked(org.eclipse.net4j.util.concurrent.IRWLockManager.LockType type, CDOLockOwner by, boolean others) If the 'others' argument isfalse
, this method returnstrue
if this lock is currently held by the requesting CDOView,false
otherwise.If the 'others' argument is
true
, this method returnstrue
if this lock is currently held by another view (i.e. any view different from the requesting one),false
otherwise. -
getReadLockOwners
Set<CDOLockOwner> getReadLockOwners() -
getWriteLockOwner
CDOLockOwner getWriteLockOwner() -
getWriteOptionOwner
CDOLockOwner getWriteOptionOwner()
-