Package arez
Class ObservableValue<T>
java.lang.Object
arez.Node
arez.ObservableValue<T>
- All Implemented Interfaces:
Disposable
The observable represents state that can be observed within the system.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Dispose the element.boolean
Return true if dispose() has been called on object.void
Check that pre-conditions are satisfied before changing observable value.void
Notify Arez that this observable has changed.void
Notify Arez that this observable has been "observed" in the current transaction.void
Notify Arez that this observable has been "observed" if a tracking transaction is active.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
Description copied from interface:Disposable
Dispose the element. SeeDisposable
for a description of the implications. -
isDisposed
Description copied from interface:Disposable
Return true if dispose() has been called on object.- Returns:
- true if dispose has been called.
-
reportObserved
Notify Arez that this observable has been "observed" in the current transaction. Before invoking this method, a transaction MUST be active but it may be read-only or read-write. -
reportObservedIfTrackingTransactionActive
Notify Arez that this observable has been "observed" if a tracking transaction is active. -
preReportChanged
Check that pre-conditions are satisfied before changing observable value. In production mode this will typically be a no-op. This method should be invoked before state is modified. Before invoking this method, a read-write transaction MUST be active. -
reportChanged
Notify Arez that this observable has changed. This is called when the observable has definitely changed. Before invoking this method, a read-write transaction MUST be active.
-