org.jgroups.util
Class RWLock
public class RWLock
extends java.lang.Object
Lock allowing multiple reads or a single write. Waiting writes have
priority over new reads.
Code derived from com.sun.jini.thread.ReadersWriter,
Jini 1.1, Sun Microsystems
void | readLock() - Obtain a read lock
|
void | readLockNoBlock() - Obtain the read lock immediatelly or throw an exception if an
attempt to get the read lock would block this call
|
void | readUnlock() - Revoke the read lock
|
void | writeLock() - Obtain a write lock
|
void | writeLockNoBlock() - Obtain the write lock immediatelly or throw an exception if an attempt
to get the write lock would block this call
|
void | writeUnlock() - Revoke the write lock
|
readLock
public void readLock()
Obtain a read lock
readLockNoBlock
public void readLockNoBlock()
throws RWLock.BlockException
Obtain the read lock immediatelly or throw an exception if an
attempt to get the read lock would block this call
readUnlock
public void readUnlock()
Revoke the read lock
writeLock
public void writeLock()
Obtain a write lock
writeLockNoBlock
public void writeLockNoBlock()
throws RWLock.BlockException
Obtain the write lock immediatelly or throw an exception if an attempt
to get the write lock would block this call
writeUnlock
public void writeUnlock()
Revoke the write lock
Copyright B) 2001,2002 www.jgroups.com . All Rights Reserved.