public static class GCUBEReadWriteLock.GCUBEReadLock extends ReentrantReadWriteLock.ReadLock
ReentrantReadWriteLock.WriteLock that supports
preemptive requests and acquisitions.| Modifier and Type | Method and Description |
|---|---|
void |
lock()
Deprecated.
use
lockInterruptibly() instead. |
void |
lockInterruptibly() |
boolean |
tryLock()
Extends the semantics of
Lock.tryLock() to cater for lock preemption. |
newCondition, toString, tryLock, unlockpublic void lock()
throws org.gcube.common.core.state.GCUBEReadWriteLock.LockPreemptedException
lockInterruptibly() instead.Lock.lock() to cater for lock preemption.lock in interface Locklock in class ReentrantReadWriteLock.ReadLockLockPreemptedException - if the lock is preempted.org.gcube.common.core.state.GCUBEReadWriteLock.LockPreemptedExceptionpublic boolean tryLock()
Lock.tryLock() to cater for lock preemption.tryLock in interface LocktryLock in class ReentrantReadWriteLock.ReadLockfalse if the lock is already held by another thread or has been preempted.public void lockInterruptibly()
throws InterruptedException
lockInterruptibly in interface LocklockInterruptibly in class ReentrantReadWriteLock.ReadLockInterruptedExceptionCopyright © 2015. All Rights Reserved.