class Queue[A] extends Serializable
A Queue[A] is a lightweight, asynchronous queue for values of type A.
- Alphabetic
- By Inheritance
- Queue
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
-
final
val
awaitShutdown: IO[Nothing, Unit]
Waits until the queue is shutdown.
Waits until the queue is shutdown. The
IOreturned by this method will not resume until the queue has been shutdown. If the queue is already shutdown, theIOwill resume right away. -
final
val
capacity: Int
For performance reasons, the actual capacity of the queue is the next power of 2 of the requested capacity.
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
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
offer(a: A): IO[Nothing, Boolean]
Places one value in the queue.
-
final
def
offerAll(as: Iterable[A]): IO[Nothing, Boolean]
For Bounded Queue: uses the
BackPressureStrategy, places the values in the queue and returns always true If the queue has reached capacity, then the fiber performing theofferAllwill be suspended until there is room in the queue.For Bounded Queue: uses the
BackPressureStrategy, places the values in the queue and returns always true If the queue has reached capacity, then the fiber performing theofferAllwill be suspended until there is room in the queue.For Unbounded Queue: Places all values in the queue and returns true.
For Sliding Queue: uses
SlidingStrategy If there is a room in the queue, it places the values and returns true otherwise it removed the old elements and enqueues the new onesFor Dropping Queue: uses
DroppingStrategy, It places the values in the queue but if there is no room it will not enqueue them and returns false -
final
val
shutdown: IO[Nothing, Unit]
Interrupts any fibers that are suspended on
offerortake.Interrupts any fibers that are suspended on
offerortake. Future calls tooffer*andtake*will be interrupted immediately. -
final
val
size: IO[Nothing, Int]
Retrieves the size of the queue, which is equal to the number of elements in the queue.
Retrieves the size of the queue, which is equal to the number of elements in the queue. This may be negative if fibers are suspended waiting for elements to be added to the queue.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
val
take: IO[Nothing, 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.
-
final
val
takeAll: IO[Nothing, List[A]]
Removes all the values in the queue and returns the list of the values.
Removes all the values in the queue and returns the list of the values. If the queue is empty returns empty list.
-
final
def
takeUpTo(max: Int): IO[Nothing, List[A]]
Takes up to max number of values in the queue.
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )