public interface ReadWriteLock
Standard usage:
class X {
ReadWriteLock rw;
// ...
public void read() throws InterruptedException {
rw.readLock().acquire();
try {
// ... do the read
}
finally {
rw.readlock().release()
}
}public void write() throws InterruptedException {
rw.writeLock().acquire();
try {
// ... do the write
}
finally {
rw.writelock().release()
}
}}
| Modifier and Type | Method and Description |
|---|---|
Sync |
readLock()
get the readLock *
|
Sync |
writeLock()
get the writeLock *
|
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com