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
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final intDeprecated.static final intDeprecated. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()org.eclipse.net4j.util.concurrent.IRWLockManager.LockTypegetType()booleanisLocked()booleanReturnstrueif this lock is currently held by anotherview(i.e.voidlock(long millis) voidvoidbooleantryLock(long millis) booleanvoidunlock(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()Returnstrueif this lock is currently held by anotherview(i.e. any view different from the requesting one),falseotherwise. -
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:
closein interfaceAutoCloseable- Since:
- 4.16
-