Create a new, updatable Var with an initial value.
Create a new, updatable Var with an initial value. We call such Vars independent -- derived Vars being dependent on these.
Create a new Var whose values are provided asynchronously by
update
.
Create a new Var whose values are provided asynchronously by
update
. The returned Var is dormant until it is observed:
update
is called by-need. Such observations are also reference
counted so that simultaneous observervations do not result in
multiple invocations of update
. When the last observer stops
observing, the com.twitter.util.Closable returned
from update
is closed. Subsequent observations result in a new
call to update
.
empty
is used to fill the returned Var until update
has
provided a value. The first observation of the returned Var is
synchronous with the call to update
--it is guaranteed the the
opportunity to fill the Var before the observer sees any value
at all.
Updates from update
are ignored after the returned
com.twitter.util.Closable is closed.
Collect a collection of Vars into a Var of collection.
Sample the current value of this Var.
Sample the current value of this Var. Note that this may lead to surprising results for lazily defined Vars: the act of observing a Var may be kick off a process to populate it; the value returned from sample may then reflect an intermediate value.
Create a new, constant, v-valued Var.