|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.aduna.concurrent.locks.WritePrefReadWriteLockManager
public class WritePrefReadWriteLockManager
A read/write lock manager with writer preference. As soon as a write lock is requested, this lock manager will block any read lock requests until the writer's request has been satisfied.
| Constructor Summary | |
|---|---|
WritePrefReadWriteLockManager()
Creates a MultiReadSingleWriteLockManager. |
|
WritePrefReadWriteLockManager(boolean trackLocks)
Creates a new MultiReadSingleWriteLockManager, optionally with lock tracking enabled. |
|
| Method Summary | |
|---|---|
Lock |
getReadLock()
Gets a read lock. |
Lock |
getWriteLock()
Gets an exclusive write lock. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WritePrefReadWriteLockManager()
public WritePrefReadWriteLockManager(boolean trackLocks)
trackLocks - Controls whether the lock manager will keep track of active locks.
Enabling lock tracking will add some overhead, but can be very
useful for debugging.| Method Detail |
|---|
public Lock getReadLock()
throws InterruptedException
getReadLock in interface ReadWriteLockManagerInterruptedException - In case the thread requesting the lock was
interrupted.
public Lock getWriteLock()
throws InterruptedException
getWriteLock in interface ReadWriteLockManagerInterruptedException - In case the thread requesting the lock was
interrupted.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||