Packages

  • package root
    Definition Classes
    root
  • package fs2
    Definition Classes
    root
  • package async

    Provides utilities for asynchronous computations.

    Provides utilities for asynchronous computations.

    Definition Classes
    fs2
  • package mutable

    Provides types which allow asynchronous reading and writing.

    Provides types which allow asynchronous reading and writing.

    Definition Classes
    async
  • Queue
  • Signal
  • Topic

abstract class Queue[F[_], A] extends AnyRef

Asynchronous queue interface. Operations are all nonblocking in their implementations, but may be 'semantically' blocking. For instance, a queue may have a bound on its size, in which case enqueuing may block until there is an offsetting dequeue.

Self Type
Queue[F, A]
Source
Queue.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Queue
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Queue()

Abstract Value Members

  1. abstract def available: immutable.Signal[F, Int]

    Returns the available number of entries in the queue.

    Returns the available number of entries in the queue. Always Int.MaxValue when the queue is unbounded.

  2. abstract def dequeue: Stream[F, A]

    Repeatedly calls dequeue1 forever.

  3. abstract def dequeue1: F[A]

    Dequeues one A from this queue.

    Dequeues one A from this queue. Completes once one is ready.

  4. abstract def dequeueBatch: Pipe[F, Int, A]

    Calls dequeueBatch1 once with a provided bound on the elements dequeued.

  5. abstract def dequeueBatch1(batchSize: Int): F[Chunk[A]]

    Dequeues at most batchSize As from this queue.

    Dequeues at most batchSize As from this queue. Completes once at least one value is ready.

  6. abstract def enqueue1(a: A): F[Unit]

    Enqueues one element in this Queue.

    Enqueues one element in this Queue. If the queue is full this waits until queue is empty.

    This completes after a has been successfully enqueued to this Queue

  7. abstract def full: immutable.Signal[F, Boolean]

    Returns true when the queue has reached its upper size bound.

    Returns true when the queue has reached its upper size bound. Always false when the queue is unbounded.

  8. abstract def offer1(a: A): F[Boolean]

    Offers one element in this Queue.

    Offers one element in this Queue.

    Evaluates to false if the queue is full, indicating the a was not queued up. Evaluates to true if the a was queued up successfully.

    a

    A to enqueue

  9. abstract def peek1: F[A]

    Returns the element which would be dequeued next, but without removing it.

    Returns the element which would be dequeued next, but without removing it. Completes when such an element is available.

  10. abstract def size: immutable.Signal[F, Int]

    The time-varying size of this Queue.

    The time-varying size of this Queue. This signal refreshes only when size changes. Offsetting enqueues and de-queues may not result in refreshes.

  11. abstract def upperBound: Option[Int]

    The size bound on the queue.

    The size bound on the queue. None if the queue is unbounded.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from Queue[F, A] to any2stringadd[Queue[F, A]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Queue[F, A], B)
    Implicit
    This member is added by an implicit conversion from Queue[F, A] to ArrowAssoc[Queue[F, A]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. def dequeueAvailable: Stream[F, A]

    Calls dequeueBatch1 forever, with a bound of Int.MaxValue

  9. def enqueue: Sink[F, A]

    Enqueues each element of the input stream to this Queue by calling enqueue1 on each element.

  10. def ensuring(cond: (Queue[F, A]) ⇒ Boolean, msg: ⇒ Any): Queue[F, A]
    Implicit
    This member is added by an implicit conversion from Queue[F, A] to Ensuring[Queue[F, A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: (Queue[F, A]) ⇒ Boolean): Queue[F, A]
    Implicit
    This member is added by an implicit conversion from Queue[F, A] to Ensuring[Queue[F, A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean, msg: ⇒ Any): Queue[F, A]
    Implicit
    This member is added by an implicit conversion from Queue[F, A] to Ensuring[Queue[F, A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean): Queue[F, A]
    Implicit
    This member is added by an implicit conversion from Queue[F, A] to Ensuring[Queue[F, A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  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. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from Queue[F, A] to StringFormat[Queue[F, A]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  18. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def imap[B](f: (A) ⇒ B)(g: (B) ⇒ A)(implicit F: Functor[F]): Queue[F, B]

    Returns an alternate view of this Queue where its elements are of type B, given two functions, A => B and B => A.

  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  26. def toString(): String
    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  30. def [B](y: B): (Queue[F, A], B)
    Implicit
    This member is added by an implicit conversion from Queue[F, A] to ArrowAssoc[Queue[F, A]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Queue[F, A] to any2stringadd[Queue[F, A]]

Inherited by implicit conversion StringFormat from Queue[F, A] to StringFormat[Queue[F, A]]

Inherited by implicit conversion Ensuring from Queue[F, A] to Ensuring[Queue[F, A]]

Inherited by implicit conversion ArrowAssoc from Queue[F, A] to ArrowAssoc[Queue[F, A]]

Ungrouped