class documentation
class ReaderMonitor(Observable):
Constructor: ReaderMonitor(startOnDemand, readerProc, period)
Class that monitors reader insertion/removal. and notify observers
note: a reader monitoring thread will be running as long as the reader monitor has observers, or ReaderMonitor.stop() is called.
It implements the shared state design pattern, where objects of the same type all share the same state, in our case essentially the ReaderMonitoring Thread. Thanks to Frank Aune for implementing the shared state pattern logics.
Method | __init__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | add |
Add an observer. |
Method | delete |
Remove an observer. |
Instance Variable | __dict__ |
Undocumented |
Instance Variable | period |
Undocumented |
Instance Variable | reader |
Undocumented |
Instance Variable | rmthread |
Undocumented |
Instance Variable | start |
Undocumented |
Class Variable | __shared |
Undocumented |
Inherited from Observable
:
Method | clear |
Undocumented |
Method | count |
Undocumented |
Method | delete |
Undocumented |
Method | has |
Undocumented |
Method | notify |
If 'changed' indicates that this object has changed, notify all its observers, then call clearChanged(). Each observer has its update() called with two arguments: this observable object and the generic 'arg'. |
Method | set |
Undocumented |
Instance Variable | changed |
Undocumented |
Instance Variable | obs |
Undocumented |
Inherited from Synchronization
(via Observable
):
Instance Variable | mutex |
Undocumented |