|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wamblee.concurrency.ReadWriteLock
@Deprecated 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.
This class was originally developed for a Java developer certification. It is
deprecated now and ReadWriteLock should be
used instead.
| Constructor Summary | |
|---|---|
ReadWriteLock()
Deprecated. Constructs read-write lock. |
|
| Method Summary | |
|---|---|
void |
acquireRead()
Deprecated. Acquires the lock for reading. |
void |
acquireWrite()
Deprecated. Acquires the lock for writing. |
void |
releaseRead()
Deprecated. Releases the lock for reading. |
void |
releaseWrite()
Deprecated. 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()
IllegalStateException - Thrown if the read or write lock is already acquired.public void releaseRead()
IllegalStateException - Thrown when the lock was not acquired by this thread.public void acquireWrite()
IllegalStateException - Thrown if the read or write lock is already acquired.public void releaseWrite()
IllegalStateException - Thrown when the lock was not acquired.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||