All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class edu.vt.marian.common.ReaderWriterMutex

java.lang.Object
   |
   +----edu.vt.marian.common.ReaderWriterMutex

public class ReaderWriterMutex
extends Object
This class provides a moniter object for thread coordination. It supports multiple readers/single writer mode. uses the services of class(es): ReaderWriterMutex(Debug debug) ReaderWriterMutex(int reader_limit, Debug debug) void read_enter() void read_exit() void writer_enter() void writer_exit() int get_max_active_reader_number() int set_max_active_reader_number(int reader_limit) designer(s): Jianxin Zhao (jxzhao@csgrad.cs.vt.edu) implementator(s): Pingang Wang (pwang@csgrad.cs.vt.edu) finished time: 11/23/98 known bugs: None JDK version: JDK 1.1.5 side effects: Unknown


Constructor Index

 o ReaderWriterMutex(Debug)
method name: ReaderWriterMutex method description: constructor of ReaderWriterMutex class uses the services of class(es): input parameter(s): Debug - debug object output parameter(s): none return value: none synchronization consideration:
 o ReaderWriterMutex(int, Debug)
method name: ReaderWriterMutex method description: constructor of ReaderWriterMutex class uses the services of class(es): input parameter(s): int reader_limit - cocurrent reader limit Debug debug - debug object output parameter(s): none return value: none synchronization consideration:

Method Index

 o get_max_active_reader_number()
method name: get_max_active_reader_number method description: Return the limit of active readers.
 o reader_enter()
method name: reader_enter method description: This method is called when a reader enters the critical section.
 o reader_exit()
method name: reader_exit method description: This method is called when a reader exits the critical section.
 o set_max_active_reader_number(int)
method name: get_max_active_reader_number method description: Set the limit of active readers.
 o writer_enter()
method name: writer_enter method description: This method is called when a writer enters the critical section.
 o writer_exit()
method name: writer_exit method description: This method is called when a writer exits the critical section.

Constructors

 o ReaderWriterMutex
 public ReaderWriterMutex(Debug debug)
method name: ReaderWriterMutex method description: constructor of ReaderWriterMutex class uses the services of class(es): input parameter(s): Debug - debug object output parameter(s): none return value: none synchronization consideration:

 o ReaderWriterMutex
 public ReaderWriterMutex(int reader_limit,
                          Debug debug)
method name: ReaderWriterMutex method description: constructor of ReaderWriterMutex class uses the services of class(es): input parameter(s): int reader_limit - cocurrent reader limit Debug debug - debug object output parameter(s): none return value: none synchronization consideration:

Methods

 o reader_enter
 public synchronized void reader_enter()
method name: reader_enter method description: This method is called when a reader enters the critical section. uses the services of class(es): input parameter(s): none output parameter(s): none return value: none synchronization consideration:

 o reader_exit
 public synchronized void reader_exit()
method name: reader_exit method description: This method is called when a reader exits the critical section. uses the services of class(es): input parameter(s): none output parameter(s): none return value: none synchronization consideration:

 o writer_enter
 public synchronized void writer_enter()
method name: writer_enter method description: This method is called when a writer enters the critical section. uses the services of class(es): input parameter(s): none output parameter(s): none return value: none synchronization consideration:

 o writer_exit
 public synchronized void writer_exit()
method name: writer_exit method description: This method is called when a writer exits the critical section. uses the services of class(es): input parameter(s): none output parameter(s): none return value: none synchronization consideration:

 o get_max_active_reader_number
 public int get_max_active_reader_number()
method name: get_max_active_reader_number method description: Return the limit of active readers. uses the services of class(es): input parameter(s): none output parameter(s): none return value: limit of active readers synchronization consideration:

 o set_max_active_reader_number
 public int set_max_active_reader_number(int reader_limit)
method name: get_max_active_reader_number method description: Set the limit of active readers. uses the services of class(es): input parameter(s): int reader_limit - active reader limit output parameter(s): none return value: none synchronization consideration:


All Packages  Class Hierarchy  This Package  Previous  Next  Index