com.twitter.util

Var

object Var

Note: There is a Java-friendly API for this object: com.twitter.util.Vars.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Var
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object Sampled

  7. def apply[T](init: T, e: Event[T]): Var[T]

    Constructs a Var from an initial value plus an event stream of changes.

    Constructs a Var from an initial value plus an event stream of changes. Note that this eagerly subscribes to the event stream; it is unsubscribed whenever the returned Var is collected.

  8. def apply[T](init: T): Var[T] with Updatable[T] with Extractable[T]

    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.

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def async[T](empty: T)(update: (Updatable[T]) ⇒ Closable): Var[T]

    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 observations 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.

  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def collect[T <: AnyRef](vars: List[Var[T]]): Var[List[T]]

    Collect a List of Vars into a new Var of List.

    Collect a List of Vars into a new Var of List.

    vars

    a java.util.List of Vars

    returns

    a Var[java.util.List[A]] containing the collected values from vars.

  13. def collect[T, CC[X] <: Traversable[X]](vars: CC[Var[T]])(implicit arg0: ClassTag[T], newBuilder: CanBuildFrom[CC[T], T, CC[T]]): Var[CC[T]]

    Collect a collection of Vars into a Var of collection.

  14. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  18. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  23. def patch[CC[_], T](diffs: Event[Diff[CC, T]])(implicit arg0: Diffable[CC]): Var[CC[T]]

    Patch reconstructs a Var based on observing the incremental changes presented in the underlying Diffs.

    Patch reconstructs a Var based on observing the incremental changes presented in the underlying Diffs.

    Note that this eagerly subscribes to the event stream; it is unsubscribed whenever the returned Var is collected.

  24. def sample[T](v: Var[T]): T

    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.

  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  26. def toString(): String

    Definition Classes
    AnyRef → Any
  27. def value[T](v: T): Var[T]

    Create a new, constant, v-valued Var.

  28. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped