|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wamblee.concurrency.ReadWriteLock
public class ReadWriteLock
Read-write lock for allowing multiple concurrent readers or at most one writer. This implementation does not aim for high performance but for robustness and simplicity. Users of this class should not synchronize on objects of this class.
| Constructor Summary | |
|---|---|
ReadWriteLock()
Constructs read-write lock. |
|
| Method Summary | |
|---|---|
void |
acquireRead()
Acquires the lock for reading. |
void |
acquireWrite()
Acquires the lock for writing. |
void |
releaseRead()
Releases the lock for reading. |
void |
releaseWrite()
Releases the lock for writing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReadWriteLock()
| Method Detail |
|---|
public void acquireRead()
java.lang.IllegalStateException - Thrown if the read or write lock is already acquired.public void releaseRead()
java.lang.IllegalStateException - Thrown when the lock was not acquired by this thread.public void acquireWrite()
java.lang.IllegalStateException - Thrown if the read or write lock is already acquired.public void releaseWrite()
java.lang.IllegalStateException - Thrown when the lock was not acquired.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||