InspectableQueue
@deprecated("Use cats.effect.std.Queue instead", "3.0.0") trait InspectableQueue[F <: ([_$46] =>> Any), A] extends Queue[F, A]
Extension of Queue that allows peeking and inspection of the current size.
- Companion
- object
Value members
Methods
Returns the element which would be dequeued next,
but without removing it. Completes when such an
element is available.
but without removing it. Completes when such an
element is available.
The time-varying size of this
Emits elements describing the current size of the queue.
Offsetting enqueues and de-queues may not result in refreshes.
Queue
.Emits elements describing the current size of the queue.
Offsetting enqueues and de-queues may not result in refreshes.
Finally, note that operations like
work on chunks when possible, which will result in faster
decreases in size that one might expect.
More granular updates can be achieved by calling
repeatedly, but this is less efficient than dequeueing in
batches.
dequeue
are optimized towork on chunks when possible, which will result in faster
decreases in size that one might expect.
More granular updates can be achieved by calling
dequeue1
repeatedly, but this is less efficient than dequeueing in
batches.
Inherited methods
Dequeues one
Chunk[A]
with no more than maxSize
elements. Completes once one is ready.- Inhertied from
- DequeueChunk1
Enqueues one element to this
If the queue is
Queue
.If the queue is
full
this waits until queue has space.This completes after
a
has been successfully enqueued to this Queue
- Inhertied from
- Enqueue
Offers one element to this
Queue
.Evaluates to
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.- Value Params
- a
-
A
to enqueue
- Inhertied from
- Enqueue
Tries to dequeue a single chunk of no more than
Unlike
instead,
max size
elements.Unlike
dequeueChunk1
, this method does not semantically block until a chunk is available -instead,
None
is returned immediately.- Inhertied from
- DequeueChunk1
Dequeues elements from the queue, ensuring elements are dequeued in chunks not exceeding
maxSize
.- Inhertied from
- Dequeue
Enqueues each element of the input stream to this queue by
calling
calling
enqueue1
on each element. Emits a unit for each element enqueued.- Inhertied from
- Enqueue
Tries to dequeue a single element. Unlike
block until a chunk is available - instead,
dequeue1
, this method does not semanticallyblock until a chunk is available - instead,
None
is returned immediately.- Inhertied from
- Dequeue1
Returns an alternate view of this
given two functions,
Queue
where its elements are of type B
,given two functions,
A => B
and B => A
.- Inhertied from
- Queue
Provides a pipe that converts a stream of batch sizes in to a stream of elements by dequeuing
batches of the specified size.
batches of the specified size.
- Inhertied from
- Dequeue