Packages

object Activity extends Serializable

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

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Activity
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. case class Failed(exc: Throwable) extends State[Nothing] with Product with Serializable

    The activity has failed, with exception exc.

  2. case class Ok[T](t: T) extends State[T] with Product with Serializable

    The activity is running with a current value of t.

  3. sealed trait State[+T] extends AnyRef

    An ADT describing the state of an Activity.

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. def apply[T](states: Event[State[T]]): Activity[T]

    Constructs an Activity from a state Event.

  5. def apply[T](): (Activity[T], Witness[Try[T]])

    Create a new pending activity.

    Create a new pending activity. The activity's state is updated by the given witness.

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. def collect[T <: AnyRef](activities: List[Activity[T]]): Activity[List[T]]

    A Java friendly method for Activity.collect().

  9. def collect[T](acts: Seq[Activity[T]]): Activity[Seq[T]]

    Collect a collection of activities into an activity of a collection of values.

    Collect a collection of activities into an activity of a collection of values.

    Example:
    1. def collect[T](activities: Coll[Activity[T]]): Activity[Coll[T]]

  10. def collectIndependent[T](acts: Seq[Activity[T]]): Activity[Seq[T]]

    Collect a collection of activities into an activity of a collection of values.

    Collect a collection of activities into an activity of a collection of values. This version relies on Var's collectIndependent, and has the same benefits and drawbacks of that method.

    Like Var.collectIndependent this is a workaround and should be deprecated when a version of Var.collect without a stack overflow issue is implemented.

    Example:
    1. def collectIndependent[T](activities: Coll[Activity[T]]): Activity[Coll[T]]

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. def exception(exc: Throwable): Activity[Nothing]

    Create a new static activity with exception exc.

  14. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  15. def future[T](f: Future[T]): Activity[T]

    Create an activity backed by a com.twitter.util.Future.

    Create an activity backed by a com.twitter.util.Future.

    The resultant Activity is pending until the original Future is satisfied. Future success or failure corresponds to the expected Activity.Ok or Activity.Failed result.

    Closure of observations of the run Var of the resultant Activity is not propagated to the original Future. That is to say, invoking close() on observations of Activity.run will not result in the cancellation of the original Future.

  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. def join[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V](a: Activity[A], b: Activity[B], c: Activity[C], d: Activity[D], e: Activity[E], f: Activity[F], g: Activity[G], h: Activity[H], i: Activity[I], j: Activity[J], k: Activity[K], l: Activity[L], m: Activity[M], n: Activity[N], o: Activity[O], p: Activity[P], q: Activity[Q], r: Activity[R], s: Activity[S], t: Activity[T], u: Activity[U], v: Activity[V]): Activity[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)]

    Join 22 Activities.

    Join 22 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  20. def join[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](a: Activity[A], b: Activity[B], c: Activity[C], d: Activity[D], e: Activity[E], f: Activity[F], g: Activity[G], h: Activity[H], i: Activity[I], j: Activity[J], k: Activity[K], l: Activity[L], m: Activity[M], n: Activity[N], o: Activity[O], p: Activity[P], q: Activity[Q], r: Activity[R], s: Activity[S], t: Activity[T], u: Activity[U]): Activity[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)]

    Join 21 Activities.

    Join 21 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  21. def join[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](a: Activity[A], b: Activity[B], c: Activity[C], d: Activity[D], e: Activity[E], f: Activity[F], g: Activity[G], h: Activity[H], i: Activity[I], j: Activity[J], k: Activity[K], l: Activity[L], m: Activity[M], n: Activity[N], o: Activity[O], p: Activity[P], q: Activity[Q], r: Activity[R], s: Activity[S], t: Activity[T]): Activity[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)]

    Join 20 Activities.

    Join 20 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  22. def join[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](a: Activity[A], b: Activity[B], c: Activity[C], d: Activity[D], e: Activity[E], f: Activity[F], g: Activity[G], h: Activity[H], i: Activity[I], j: Activity[J], k: Activity[K], l: Activity[L], m: Activity[M], n: Activity[N], o: Activity[O], p: Activity[P], q: Activity[Q], r: Activity[R], s: Activity[S]): Activity[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)]

    Join 19 Activities.

    Join 19 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  23. def join[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](a: Activity[A], b: Activity[B], c: Activity[C], d: Activity[D], e: Activity[E], f: Activity[F], g: Activity[G], h: Activity[H], i: Activity[I], j: Activity[J], k: Activity[K], l: Activity[L], m: Activity[M], n: Activity[N], o: Activity[O], p: Activity[P], q: Activity[Q], r: Activity[R]): Activity[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)]

    Join 18 Activities.

    Join 18 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  24. def join[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](a: Activity[A], b: Activity[B], c: Activity[C], d: Activity[D], e: Activity[E], f: Activity[F], g: Activity[G], h: Activity[H], i: Activity[I], j: Activity[J], k: Activity[K], l: Activity[L], m: Activity[M], n: Activity[N], o: Activity[O], p: Activity[P], q: Activity[Q]): Activity[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)]

    Join 17 Activities.

    Join 17 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  25. def join[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](a: Activity[A], b: Activity[B], c: Activity[C], d: Activity[D], e: Activity[E], f: Activity[F], g: Activity[G], h: Activity[H], i: Activity[I], j: Activity[J], k: Activity[K], l: Activity[L], m: Activity[M], n: Activity[N], o: Activity[O], p: Activity[P]): Activity[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)]

    Join 16 Activities.

    Join 16 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  26. def join[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](a: Activity[A], b: Activity[B], c: Activity[C], d: Activity[D], e: Activity[E], f: Activity[F], g: Activity[G], h: Activity[H], i: Activity[I], j: Activity[J], k: Activity[K], l: Activity[L], m: Activity[M], n: Activity[N], o: Activity[O]): Activity[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)]

    Join 15 Activities.

    Join 15 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  27. def join[A, B, C, D, E, F, G, H, I, J, K, L, M, N](a: Activity[A], b: Activity[B], c: Activity[C], d: Activity[D], e: Activity[E], f: Activity[F], g: Activity[G], h: Activity[H], i: Activity[I], j: Activity[J], k: Activity[K], l: Activity[L], m: Activity[M], n: Activity[N]): Activity[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)]

    Join 14 Activities.

    Join 14 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  28. def join[A, B, C, D, E, F, G, H, I, J, K, L, M](a: Activity[A], b: Activity[B], c: Activity[C], d: Activity[D], e: Activity[E], f: Activity[F], g: Activity[G], h: Activity[H], i: Activity[I], j: Activity[J], k: Activity[K], l: Activity[L], m: Activity[M]): Activity[(A, B, C, D, E, F, G, H, I, J, K, L, M)]

    Join 13 Activities.

    Join 13 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  29. def join[A, B, C, D, E, F, G, H, I, J, K, L](a: Activity[A], b: Activity[B], c: Activity[C], d: Activity[D], e: Activity[E], f: Activity[F], g: Activity[G], h: Activity[H], i: Activity[I], j: Activity[J], k: Activity[K], l: Activity[L]): Activity[(A, B, C, D, E, F, G, H, I, J, K, L)]

    Join 12 Activities.

    Join 12 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  30. def join[A, B, C, D, E, F, G, H, I, J, K](a: Activity[A], b: Activity[B], c: Activity[C], d: Activity[D], e: Activity[E], f: Activity[F], g: Activity[G], h: Activity[H], i: Activity[I], j: Activity[J], k: Activity[K]): Activity[(A, B, C, D, E, F, G, H, I, J, K)]

    Join 11 Activities.

    Join 11 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  31. def join[A, B, C, D, E, F, G, H, I, J](a: Activity[A], b: Activity[B], c: Activity[C], d: Activity[D], e: Activity[E], f: Activity[F], g: Activity[G], h: Activity[H], i: Activity[I], j: Activity[J]): Activity[(A, B, C, D, E, F, G, H, I, J)]

    Join 10 Activities.

    Join 10 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  32. def join[A, B, C, D, E, F, G, H, I](a: Activity[A], b: Activity[B], c: Activity[C], d: Activity[D], e: Activity[E], f: Activity[F], g: Activity[G], h: Activity[H], i: Activity[I]): Activity[(A, B, C, D, E, F, G, H, I)]

    Join 9 Activities.

    Join 9 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  33. def join[A, B, C, D, E, F, G, H](a: Activity[A], b: Activity[B], c: Activity[C], d: Activity[D], e: Activity[E], f: Activity[F], g: Activity[G], h: Activity[H]): Activity[(A, B, C, D, E, F, G, H)]

    Join 8 Activities.

    Join 8 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  34. def join[A, B, C, D, E, F, G](a: Activity[A], b: Activity[B], c: Activity[C], d: Activity[D], e: Activity[E], f: Activity[F], g: Activity[G]): Activity[(A, B, C, D, E, F, G)]

    Join 7 Activities.

    Join 7 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  35. def join[A, B, C, D, E, F](a: Activity[A], b: Activity[B], c: Activity[C], d: Activity[D], e: Activity[E], f: Activity[F]): Activity[(A, B, C, D, E, F)]

    Join 6 Activities.

    Join 6 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  36. def join[A, B, C, D, E](a: Activity[A], b: Activity[B], c: Activity[C], d: Activity[D], e: Activity[E]): Activity[(A, B, C, D, E)]

    Join 5 Activities.

    Join 5 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  37. def join[A, B, C, D](a: Activity[A], b: Activity[B], c: Activity[C], d: Activity[D]): Activity[(A, B, C, D)]

    Join 4 Activities.

    Join 4 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  38. def join[A, B, C](a: Activity[A], b: Activity[B], c: Activity[C]): Activity[(A, B, C)]

    Join 3 Activities.

    Join 3 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  39. def join[A, B](a: Activity[A], b: Activity[B]): Activity[(A, B)]

    Join 2 Activities.

    Join 2 Activities. The returned Activity is complete when all underlying Activities are nonpending. It fails immediately if any of them do.

  40. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  41. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  42. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  43. val pending: Activity[Nothing]

    A static Activity that is pending.

  44. def sample[T](act: Activity[T]): T

    Sample given Activity.

  45. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  46. def toString(): String
    Definition Classes
    AnyRef → Any
  47. def value[T](v: T): Activity[T]

    Create a new static activity with value v.

  48. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  49. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  50. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  51. object Pending extends State[Nothing]

    The activity is pending output.

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped