Package arez
Class Observer
java.lang.Object
arez.Node
arez.Observer
- All Implemented Interfaces:
Disposable
A node within Arez that is notified of changes in 0 or more Observables.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Make the Observer INACTIVE and release any resources associated with observer.boolean
Return true if dispose() has been called on object.void
This method should be invoked if the observer has non-arez dependencies and one of these dependencies has been updated.void
schedule()
Schedule this observer if it does not already have a reaction pending.Methods inherited from class arez.Node
getContext, getName, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface arez.Disposable
isNotDisposed
-
Method Details
-
dispose
Make the Observer INACTIVE and release any resources associated with observer. The applications should NOT interact with the Observer after it has been disposed. -
isDisposed
Description copied from interface:Disposable
Return true if dispose() has been called on object.- Returns:
- true if dispose has been called.
-
reportStale
This method should be invoked if the observer has non-arez dependencies and one of these dependencies has been updated. This will mark the observer as stale and reschedule the reaction if necessary. The method must be invoked from within a read-write transaction. the reaction if necessary. The method must be invoked from within a read-write transaction. -
schedule
Schedule this observer if it does not already have a reaction pending. The observer will not actually react if it is not already marked as STALE.
-