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
-
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:
-
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:
-
get_max_active_reader_number()
- method name: get_max_active_reader_number
method description: Return the limit of active readers.
-
reader_enter()
- method name: reader_enter
method description: This method is called when a reader enters the critical section.
-
reader_exit()
- method name: reader_exit
method description: This method is called when a reader exits the critical section.
-
set_max_active_reader_number(int)
- method name: get_max_active_reader_number
method description: Set the limit of active readers.
-
writer_enter()
- method name: writer_enter
method description: This method is called when a writer enters the critical section.
-
writer_exit()
- method name: writer_exit
method description: This method is called when a writer exits the critical section.
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:
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:
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:
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:
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:
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:
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:
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