trait Enqueue[-A] extends Serializable
A queue that can only be enqueued.
- Alphabetic
- By Inheritance
- Enqueue
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
offer(a: A)(implicit trace: Trace): UIO[Boolean]
Places one value in the queue.
-
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 theofferAll
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. -
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, 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.
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( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[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()
-
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
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
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
- @throws( ... ) @native()