Object/Trait

com.twitter.concurrent

Spool

Related Docs: trait Spool | package concurrent

Permalink

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

    Permalink
  2. class Syntax[A] extends AnyRef

    Permalink

    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

    Permalink
  4. class ToSpool[A] extends AnyRef

    Permalink

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

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. object **::

    Permalink
  4. object *::

    Permalink
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. object Empty extends Spool[Nothing]

    Permalink
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def empty[A]: Spool[A]

    Permalink

    The empty spool.

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def fromSeq[A](seq: Seq[A]): Spool[A]

    Permalink

    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.

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

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

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

    Permalink
    Definition Classes
    Any
  17. def merge[A](spools: Seq[Future[Spool[A]]]): Future[Spool[A]]

    Permalink

    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.

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

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. implicit def seqToSpool[A](s: Seq[A]): ToSpool[A]

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

    Permalink
    Definition Classes
    AnyRef
  23. implicit def syntax[A](s: ⇒ Future[Spool[A]]): Syntax[A]

    Permalink
  24. implicit def syntax1[A](s: Spool[A]): Syntax1[A]

    Permalink
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def cons[A](value: A, nextSpool: Spool[A]): Spool[A]

    Permalink
    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]

    Permalink

    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