Packages

abstract class Queue[A] extends Dequeue[A] with Enqueue[A]

A Queue is a lightweight, asynchronous queue into which values can be enqueued and of which elements can be dequeued.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Queue
  2. Enqueue
  3. Dequeue
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Queue()

Abstract Value Members

  1. abstract def awaitShutdown(implicit trace: Trace): UIO[Unit]

    Waits until the queue is shutdown.

    Waits until the queue is shutdown. The IO returned by this method will not resume until the queue has been shutdown. If the queue is already shutdown, the IO will resume right away.

    Definition Classes
    Enqueue
  2. abstract def capacity: Int

    How many elements can hold in the queue

    How many elements can hold in the queue

    Definition Classes
    Enqueue
  3. abstract def isShutdown(implicit trace: Trace): UIO[Boolean]

    true if shutdown has been called.

    true if shutdown has been called.

    Definition Classes
    Enqueue
  4. abstract def offer(a: A)(implicit trace: Trace): UIO[Boolean]

    Places one value in the queue.

    Places one value in the queue.

    Definition Classes
    Enqueue
  5. abstract def offerAll[A1 <: A](as: Iterable[A1])(implicit trace: Trace): UIO[Chunk[A1]]

    For Bounded Queue: uses the BackPressure Strategy, places the values in the queue and always returns no leftovers.

    For Bounded Queue: uses the BackPressure Strategy, places the values in the queue and always returns no leftovers. If the queue has reached capacity, then the fiber performing the offerAll will be suspended until there is room in the queue.

    For Unbounded Queue: Places all values in the queue and returns no leftovers.

    For Sliding Queue: uses Sliding Strategy If there is room in the queue, it places the values otherwise it removes the old elements and enqueues the new ones. Always returns no leftovers.

    For Dropping Queue: uses Dropping Strategy, It places the values in the queue but if there is no room it will not enqueue them and return the leftovers.

    Definition Classes
    Enqueue
  6. abstract def shutdown(implicit trace: Trace): UIO[Unit]

    Interrupts any fibers that are suspended on offer or take.

    Interrupts any fibers that are suspended on offer or take. Future calls to offer* and take* will be interrupted immediately.

    Definition Classes
    Enqueue
  7. abstract def size(implicit trace: Trace): UIO[Int]

    Retrieves the size of the queue.

    Retrieves the size of the queue. This may be negative if fibers are suspended waiting for elements to be added to the queue or greater than the capacity if fibers are suspended waiting to add elements to the queue.

    Definition Classes
    Enqueue
  8. abstract def take(implicit trace: Trace): UIO[A]

    Removes the oldest value in the queue.

    Removes the oldest value in the queue. If the queue is empty, this will return a computation that resumes when an item has been added to the queue.

    Definition Classes
    Dequeue
  9. abstract def takeAll(implicit trace: Trace): UIO[Chunk[A]]

    Removes all the values in the queue and returns the values.

    Removes all the values in the queue and returns the values. If the queue is empty returns an empty collection.

    Definition Classes
    Dequeue
  10. abstract def takeUpTo(max: Int)(implicit trace: Trace): UIO[Chunk[A]]

    Takes up to max number of values in the queue.

    Takes up to max number of values in the queue.

    Definition Classes
    Dequeue

Concrete 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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. final def isEmpty(implicit trace: Trace): UIO[Boolean]

    Checks whether the queue is currently empty.

    Checks whether the queue is currently empty.

    Definition Classes
    QueueEnqueueDequeue
  11. final def isFull(implicit trace: Trace): UIO[Boolean]

    Checks whether the queue is currently full.

    Checks whether the queue is currently full.

    Definition Classes
    QueueEnqueueDequeue
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def poll(implicit trace: Trace): UIO[Option[A]]

    Take the head option of values in the queue.

    Take the head option of values in the queue.

    Definition Classes
    Dequeue
  17. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  18. final def takeBetween(min: Int, max: Int)(implicit trace: Trace): UIO[Chunk[A]]

    Takes a number of elements from the queue between the specified minimum and maximum.

    Takes a number of elements from the queue between the specified minimum and maximum. If there are fewer than the minimum number of elements available, suspends until at least the minimum number of elements have been collected.

    Definition Classes
    Dequeue
  19. final def takeN(n: Int)(implicit trace: Trace): UIO[Chunk[A]]

    Takes the specified number of elements from the queue.

    Takes the specified number of elements from the queue. If there are fewer than the specified number of elements available, it suspends until they become available.

    Definition Classes
    Dequeue
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Enqueue[A]

Inherited from Dequeue[A]

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped