Package org.eclipse.emf.cdo

# Schnittstelle CDOLock

Alle Superschnittstellen:
  `AutoCloseable`, `Lock`

public interface CDOLock extends Lock, AutoCloseable
A read or write lock on an `object` as returned by `CDOObject.cdoReadLock()` or `CDOObject.cdoWriteLock()`.

Seit:
  2.0
Autor:
  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.

## Verschachtelte Klassen - Übersicht

Verschachtelte Klassen
Modifizierer und Typ
Schnittstelle
Beschreibung
`static interface`
`CDOLock.CDOAcquiredLock`
Captures additional information about an `acquired` lock, such as whether it is `recursive`.

## Feldübersicht

Felder
Modifizierer und Typ
Feld
Beschreibung
`static final long`
`NO_TIMEOUT`
`static final int`
`NO_WAIT`
Veraltet.
`static final int`
`WAIT`
Veraltet.

## Methodenübersicht

Modifizierer und Typ
Methode
Beschreibung
`CDOLock.CDOAcquiredLock`
`acquire(long time, TimeUnit unit, boolean recursive)`
`default void`
`close()`
`CDOObject`
`getObject()`
`Set<CDOLockOwner>`
`getOwners()`
`org.eclipse.net4j.util.concurrent.IRWLockManager.LockType`
`getType()`
`boolean`
`isLocked()`
Returns `true` if this lock is currently held by the requesting `view`, `false` otherwise.
`boolean`
`isLockedByOthers()`
Returns `true` if this lock is currently held by another `view` (i.e.
`void`
`lock(long millis)`
`void`
`lock(long time, TimeUnit unit)`
`void`
`lock(long time, TimeUnit unit, boolean recursive)`
`boolean`
`tryLock(long millis)`
`boolean`
`tryLock(long time, TimeUnit unit, boolean recursive)`
`void`
`unlock(boolean recursive)`

### Von Schnittstelle geerbte Methoden java.util.concurrent.locks.Lock

`lock, lockInterruptibly, newCondition, tryLock, tryLock, unlock`

## Felddetails

### NO_TIMEOUT

static final long NO_TIMEOUT

Seit:
  4.15
Siehe auch:
  - Konstantenfeldwerte

### WAIT

@Deprecated static final int WAIT
Veraltet.

Siehe auch:
  - Konstantenfeldwerte

### NO_WAIT

@Deprecated static final int NO_WAIT
Veraltet.

Siehe auch:
  - Konstantenfeldwerte

## Methodendetails

### getObject

CDOObject getObject()

Seit:
  4.8

### getType

org.eclipse.net4j.util.concurrent.IRWLockManager.LockType getType()

Seit:
  3.0

### getOwners

Set<CDOLockOwner> getOwners()

Seit:
  4.15

### isLocked

boolean isLocked()
Returns `true` if this lock is currently held by the requesting `view`, `false` otherwise.

### isLockedByOthers

boolean isLockedByOthers()
Returns `true` if this lock is currently held by another `view` (i.e. any view different from the requesting one), `false` otherwise.

### lock

void lock(long time, TimeUnit unit) throws TimeoutException

Löst aus:
  `TimeoutException`
Seit:
  4.0

### lock

void lock(long time, TimeUnit unit, boolean recursive) throws TimeoutException

Löst aus:
  `TimeoutException`
Seit:
  4.16

### lock

void lock(long millis) throws TimeoutException

Löst aus:
  `TimeoutException`
Seit:
  4.0

### tryLock

boolean tryLock(long millis) throws InterruptedException

Löst aus:
  `InterruptedException`
Seit:
  4.0

### tryLock

boolean tryLock(long time, TimeUnit unit, boolean recursive) throws InterruptedException

Löst aus:
  `InterruptedException`
Seit:
  4.16

### acquire

CDOLock.CDOAcquiredLock acquire(long time, TimeUnit unit, boolean recursive) throws TimeoutException

Löst aus:
  `TimeoutException`
Seit:
  4.16

### unlock

void unlock(boolean recursive)

Seit:
  4.16

### close

default void close()

Angegeben von:
  `close` in Schnittstelle `AutoCloseable`
Seit:
  4.16