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
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Make the Observer INACTIVE and release any resources associated with observer.booleanReturn true if dispose() has been called on object.voidThis method should be invoked if the observer has non-arez dependencies and one of these dependencies has been updated.voidschedule()Schedule this observer if it does not already have a reaction pending.Methods inherited from class arez.Node
getContext, getName, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:DisposableReturn 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.
-