Package org.eclipse.emf.cdo
Interface CDOLock
- All Superinterfaces:
AutoCloseable
,Lock
A read or write lock on an
object
as returned by CDOObject.cdoReadLock()
or
CDOObject.cdoWriteLock()
.- Since:
- 2.0
- Author:
- Simon McDuff
- No Implement
- This interface is not intended to be implemented by clients.
- No Extend
- This interface is not intended to be extended by clients.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
static final int
Deprecated.static final int
Deprecated. -
Method Summary
Modifier and TypeMethodDescriptiondefault void
close()
org.eclipse.net4j.util.concurrent.IRWLockManager.LockType
getType()
boolean
isLocked()
boolean
Returnstrue
if this lock is currently held by anotherview
(i.e.void
lock
(long millis) void
void
boolean
tryLock
(long millis) boolean
void
unlock
(boolean recursive) Methods inherited from interface java.util.concurrent.locks.Lock
lock, lockInterruptibly, newCondition, tryLock, tryLock, unlock
-
Field Details
-
NO_TIMEOUT
static final long NO_TIMEOUT- Since:
- 4.15
- See Also:
-
WAIT
Deprecated.- See Also:
-
NO_WAIT
Deprecated.- See Also:
-
-
Method Details
-
getObject
CDOObject getObject()- Since:
- 4.8
-
getType
org.eclipse.net4j.util.concurrent.IRWLockManager.LockType getType()- Since:
- 3.0
-
getOwners
Set<CDOLockOwner> getOwners()- Since:
- 4.15
-
isLocked
boolean isLocked() -
isLockedByOthers
boolean isLockedByOthers()Returnstrue
if this lock is currently held by anotherview
(i.e. any view different from the requesting one),false
otherwise. -
lock
- Throws:
TimeoutException
- Since:
- 4.0
-
lock
- Throws:
TimeoutException
- Since:
- 4.16
-
lock
- Throws:
TimeoutException
- Since:
- 4.0
-
tryLock
- Throws:
InterruptedException
- Since:
- 4.0
-
tryLock
- Throws:
InterruptedException
- Since:
- 4.16
-
acquire
CDOLock.CDOAcquiredLock acquire(long time, TimeUnit unit, boolean recursive) throws TimeoutException - Throws:
TimeoutException
- Since:
- 4.16
-
unlock
void unlock(boolean recursive) - Since:
- 4.16
-
close
default void close()- Specified by:
close
in interfaceAutoCloseable
- Since:
- 4.16
-