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 TypeMethodDescriptionvoiddispose()Dispose the element.booleanReturn true if dispose() has been called on object.voidCheck that pre-conditions are satisfied before changing observable value.voidNotify Arez that this observable has changed.voidNotify Arez that this observable has been "observed" in the current transaction.voidNotify Arez that this observable has been "observed" if a tracking transaction is active.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
Description copied from interface:DisposableDispose the element. SeeDisposablefor a description of the implications. -
isDisposed
Description copied from interface:DisposableReturn 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.
-