|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Observable
org.hd.d.pg2k.webSvr.exhibit.DataSourceBean.EDVHObservable
private static final class DataSourceBean.EDVHObservable
An Observable that changes when its "currentEDVH" value changes. This currentEDVH is the hash over the exhibit data.
When we call notifyObserversInNewThread() we do so where possible with a single Integer argument carrying the current hash value. An Observer may ignore a call when the value matches its current hash in case it has already rebuilt its cache.
Note that we build this on top of the default Observable implementation which holds no locks while delivering notifications, which should help us avoid deadlocks.
| Field Summary | |
|---|---|
private int |
currentEVDH
The current hash of the exhibits: when this changes then the whole Observable hasChanged(). |
private java.lang.Thread |
deliveryThread
Thread, if any, being used to deliver notifications. |
| Constructor Summary | |
|---|---|
private |
DataSourceBean.EDVHObservable()
|
| Method Summary | |
|---|---|
(package private) void |
notifyObserversInNewThread(java.lang.Object arg)
Spins off background thread to call super.notifyObserversInNewThread(). |
(package private) void |
setCurrentEDVH(int currentEVDH)
Set the currentEVDH; when changed hasChanged() returns true. |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int currentEVDH
private java.lang.Thread deliveryThread
| Constructor Detail |
|---|
private DataSourceBean.EDVHObservable()
| Method Detail |
|---|
final void setCurrentEDVH(int currentEVDH)
final void notifyObserversInNewThread(java.lang.Object arg)
No lock is held while notifications are delivered; the instance lock may be briefly held while the thread field is being examined and a thread launched.
arg - any object
|
DHD Multimedia Gallery V1.53.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||