com.twitter.util

Activity

case class Activity[+T](run: Var[State[T]]) extends Product with Serializable

An Activity is a handle to a concurrently running process, producing T-typed values. An activity is in one of three states:

An activity may transition between any state at any time.

(The observant reader will notice that this is really a monad transformer for an Op monad over Var where Op is like a Try with an additional pending state.)

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Activity
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Activity(run: Var[State[T]])

Value Members

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

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def collect[U](f: PartialFunction[T, U]): Activity[U]

    Build a new activity by applying f to each value.

    Build a new activity by applying f to each value. When f is not defined for this activity's current value, the derived activity becomes pending.

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

    Definition Classes
    AnyRef
  8. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def flatMap[U](f: (T) ⇒ Activity[U]): Activity[U]

    The activity which behaves as f applied to Ok values.

  10. final def getClass(): Class[_]

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

    Definition Classes
    Any
  12. def join[U](that: Activity[U]): Activity[(T, U)]

    Join two activities.

  13. def map[U](f: (T) ⇒ U): Activity[U]

    Map a T-typed activity to a U-typed one.

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

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

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

    Definition Classes
    AnyRef
  17. val run: Var[State[T]]

  18. def sample(): T

    Sample the current value of this activity.

    Sample the current value of this activity. Sample throws an exception if the activity is in pending state or has failed.

  19. def states: Event[State[T]]

    An Event of states.

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

    Definition Classes
    AnyRef
  21. def transform[U](f: (State[T]) ⇒ Activity[U]): Activity[U]

    The activity which behaves as f to the state of this activity.

  22. def values: Event[Try[T]]

    An Event containing only nonpending values.

  23. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped