object Spool

Note: Spool is no longer the recommended asynchronous stream abstraction. We encourage you to use AsyncStream instead.

Note: There is a Java-friendly API for this object: com.twitter.concurrent.Spools.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Spool
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class Cons[A](head: A, tail: Future[Spool[A]]) extends Spool[A] with Product with Serializable
  2. class Syntax[A] extends AnyRef

    Syntax support.

    Syntax support. We retain different constructors for future resolving vs. not.

    *:: constructs and deconstructs deferred tails **:: constructs and deconstructs eager tails

  3. class Syntax1[A] extends AnyRef
  4. class ToSpool[A] extends AnyRef

    Adds an implicit method to efficiently convert a Seq[A] to a Spool[A]

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
    @native() @throws( ... )
  6. def empty[A]: Spool[A]

    The empty spool.

  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def fromSeq[A](seq: Seq[A]): Spool[A]

    Lazily builds a Spool from a Seq.

    Lazily builds a Spool from a Seq.

    The main difference between this and seqToSpool is that this method also consumes the Seq lazily, which means if used with Streams, it will preserve laziness.

  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def merge[A](spools: Seq[Future[Spool[A]]]): Future[Spool[A]]

    Merges spools as they're ready, or evenly between the ready spools if there's more than one ready, until every spool is empty.

    Merges spools as they're ready, or evenly between the ready spools if there's more than one ready, until every spool is empty. Fails the tail of the returned Spool when any of the Spools you're merging over fails.

  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. implicit def seqToSpool[A](s: Seq[A]): ToSpool[A]
  19. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  20. implicit def syntax[A](s: ⇒ Future[Spool[A]]): Syntax[A]
  21. implicit def syntax1[A](s: Spool[A]): Syntax1[A]
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  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
    @native() @throws( ... )
  26. object **::
  27. object *::
  28. object Empty extends Spool[Nothing]

Deprecated Value Members

  1. def cons[A](value: A, nextSpool: Spool[A]): Spool[A]
    Annotations
    @deprecated
    Deprecated

    (Since version 6.14.1) Use *:: instead: the ABI for this method will be changing.

  2. def cons[A](value: A, next: Future[Spool[A]]): Spool[A]

    Cons a value & tail to a new {{Spool}}.

    Cons a value & tail to a new {{Spool}}. To defer the tail of the Spool, use the {{*::}} operator instead.

    Annotations
    @deprecated
    Deprecated

    (Since version 6.14.1) Use *:: instead: the ABI for this method will be changing.

Inherited from AnyRef

Inherited from Any

Ungrouped