edu.rice.cs.util.text
Interface ReadersWritersLocking


public interface ReadersWritersLocking

Interface with readers/writers locking operations. Can't use names from swing AbstractDocument class because write locking operations are protected not public.


Field Summary
static int UNREADLOCKED
          The count indicating that there are no readers of this object (logged using acquireReadLock()).
 
Method Summary
 void acquireReadLock()
          Swing-style acquireReadLock().
 void acquireWriteLock()
          Swing-style writeLock().
 boolean isReadLocked()
          Returns true iff this thread holds a read lock or write lock.
 boolean isWriteLocked()
          Returns true iff this thread holds a write lock.
 void releaseReadLock()
          Swing-style releaseReadLock().
 void releaseWriteLock()
          Swing-style writeUnlock().
 

Field Detail

UNREADLOCKED

static final int UNREADLOCKED
The count indicating that there are no readers of this object (logged using acquireReadLock()).

See Also:
Constant Field Values
Method Detail

acquireReadLock

void acquireReadLock()
Swing-style acquireReadLock().


releaseReadLock

void releaseReadLock()
Swing-style releaseReadLock().


acquireWriteLock

void acquireWriteLock()
Swing-style writeLock().


releaseWriteLock

void releaseWriteLock()
Swing-style writeUnlock().


isReadLocked

boolean isReadLocked()
Returns true iff this thread holds a read lock or write lock.


isWriteLocked

boolean isWriteLocked()
Returns true iff this thread holds a write lock.