trait Dequeue[+A] extends Serializable
A queue that can only be dequeued.
- Alphabetic
- By Inheritance
- Dequeue
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- 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, theIO
will resume right away. - abstract def capacity: Int
How many elements can hold in the queue
- abstract def isShutdown(implicit trace: Trace): UIO[Boolean]
true
ifshutdown
has been called. - abstract def shutdown(implicit trace: Trace): UIO[Unit]
Interrupts any fibers that are suspended on
offer
ortake
.Interrupts any fibers that are suspended on
offer
ortake
. Future calls tooffer*
andtake*
will be interrupted immediately. - 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.
- 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.
- 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.
- abstract def takeUpTo(max: Int)(implicit trace: Trace): UIO[Chunk[A]]
Takes up to max number of values in the queue.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def isEmpty(implicit trace: Trace): UIO[Boolean]
Checks whether the queue is currently empty.
- def isFull(implicit trace: Trace): UIO[Boolean]
Checks whether the queue is currently full.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def poll(implicit trace: Trace): UIO[Option[A]]
Take the head option of values in the queue.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- 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.
- 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.
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()