public interface Lockable
| Modifier and Type | Method and Description |
|---|---|
void |
exclusiveLock()
Acquires an exclusive lock.
|
boolean |
releaseExclusiveLock()
Releases an exclusive lock of the current thread.
|
void |
releaseSharedLock()
Releases a shared lock of the current thread.
|
void |
sharedLock()
Acquires a shared lock.
|
boolean |
tryExclusiveLock()
Try to get an exclusive lock immediately.
|
boolean |
trySharedLock()
Tries to get a shared lock immediately.
|
void sharedLock()
void exclusiveLock()
boolean trySharedLock()
true if the lock has been allocated, false otherwiseboolean tryExclusiveLock()
true if the lock has been allocated, false otherwisevoid releaseSharedLock()
boolean releaseExclusiveLock()