JavaScript is disabled on your browser.
class MRSWLock
extends java.lang.Object
Use this lock to allow multiple reads/single write synchronization.
To prevent deadlock a read/writeLock call must match with a read/writeUnlock call.
Write request has precedence over read request.
Constructor Summary
Constructors
Constructor and Description
MRSWLock ()
Method Summary
Methods
Modifier and Type
Method and Description
(package private) void
readLock ()
(package private) void
readUnlock ()
(package private) void
writeLock ()
(package private) void
writeUnlock ()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
debug
static boolean debug
readCount
private int readCount
write
private boolean write
Method Detail
readLock
final void readLock()
readUnlock
final void readUnlock()
writeLock
final void writeLock()
writeUnlock
final void writeUnlock()
Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms .