BRUtil - Making Java a Kinder, Gentler, Place to be.

brutil
Class ReadWriteMutex

java.lang.Object
  |
  +--brutil.ReadWriteMutex

public class ReadWriteMutex
extends java.lang.Object

This class uses a Readers-Writers mutex from Doug Lea's book, Concurrent Programming in Java, Second Edition. It may be used by calling 'beforeRead' and 'afterRead' explicitly before and after a read. The same with 'beforeWrite' and 'afterWrite' for writing. There are some built-in constructs, however, that allow the Aspect ReadWriteSynchronizing to call these methods automatically.


Constructor Summary
ReadWriteMutex()
           
 
Method Summary
 void afterRead()
           
 void afterWrite()
           
 void beforeRead()
           
 void beforeWrite()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadWriteMutex

public ReadWriteMutex()
Method Detail

beforeRead

public void beforeRead()

afterRead

public void afterRead()

beforeWrite

public void beforeWrite()

afterWrite

public void afterWrite()


BRUtil - Making Java a Kinder, Gentler, Place to be.