trait InspectableQueue[F[_], A] extends Queue[F, A]
Extension of Queue that allows peeking and inspection of the current size.
- Source
- Queue.scala
- Alphabetic
- By Inheritance
- InspectableQueue
- Queue
- Dequeue
- DequeueChunk1
- Dequeue1
- Enqueue
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
dequeue1: F[A]
Dequeues one
A
from this queue.Dequeues one
A
from this queue. Completes once one is ready.- Definition Classes
- Dequeue1
-
abstract
def
dequeueBatch: Pipe[F, Int, A]
Provides a pipe that converts a stream of batch sizes in to a stream of elements by dequeuing batches of the specified size.
Provides a pipe that converts a stream of batch sizes in to a stream of elements by dequeuing batches of the specified size.
- Definition Classes
- Dequeue
-
abstract
def
dequeueChunk(maxSize: Int): Stream[F, A]
Dequeues elements from the queue, ensuring elements are dequeued in chunks not exceeding
maxSize
.Dequeues elements from the queue, ensuring elements are dequeued in chunks not exceeding
maxSize
.- Definition Classes
- Dequeue
-
abstract
def
dequeueChunk1(maxSize: Int): F[Id[Chunk[A]]]
Dequeues one
Chunk[A]
with no more thanmaxSize
elements.Dequeues one
Chunk[A]
with no more thanmaxSize
elements. Completes once one is ready.- Definition Classes
- DequeueChunk1
-
abstract
def
enqueue1(a: A): F[Unit]
Enqueues one element to this
Queue
.Enqueues one element to this
Queue
. If the queue isfull
this waits until queue has space.This completes after
a
has been successfully enqueued to thisQueue
- Definition Classes
- Enqueue
-
abstract
def
getSize: F[Int]
Gets the current size of the queue.
-
abstract
def
offer1(a: A): F[Boolean]
Offers one element to this
Queue
.Offers one element to this
Queue
.Evaluates to
false
if the queue is full, indicating thea
was not queued up. Evaluates totrue
if thea
was queued up successfully.- a
A
to enqueue
- Definition Classes
- Enqueue
-
abstract
def
peek1: F[A]
Returns the element which would be dequeued next, but without removing it.
Returns the element which would be dequeued next, but without removing it. Completes when such an element is available.
-
abstract
def
size: Stream[F, Int]
The time-varying size of this
Queue
.The time-varying size of this
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
dequeue
are optimized to work on chunks when possible, which will result in faster decreases in size that one might expect. More granular updates can be achieved by callingdequeue1
repeatedly, but this is less efficient than dequeueing in batches. -
abstract
def
tryDequeue1: F[Option[A]]
Tries to dequeue a single element.
Tries to dequeue a single element. Unlike
dequeue1
, this method does not semantically block until a chunk is available - instead,None
is returned immediately.- Definition Classes
- Dequeue1
-
abstract
def
tryDequeueChunk1(maxSize: Int): F[Option[Id[Chunk[A]]]]
Tries to dequeue a single chunk of no more than
max size
elements.Tries to dequeue a single chunk of no more than
max size
elements. UnlikedequeueChunk1
, this method does not semantically block until a chunk is available - instead,None
is returned immediately.- Definition Classes
- DequeueChunk1
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() @HotSpotIntrinsicCandidate()
-
def
dequeue: Stream[F, A]
Dequeues elements from the queue.
Dequeues elements from the queue.
- Definition Classes
- Dequeue
-
def
enqueue: Pipe[F, A, Unit]
Enqueues each element of the input stream to this queue by calling
enqueue1
on each element.Enqueues each element of the input stream to this queue by calling
enqueue1
on each element. Emits a unit for each element enqueued.- Definition Classes
- Enqueue
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
imap[B](f: (A) ⇒ B)(g: (B) ⇒ A)(implicit F: Functor[F]): Queue[F, B]
Returns an alternate view of this
Queue
where its elements are of typeB
, given two functions,A => B
andB => A
.Returns an alternate view of this
Queue
where its elements are of typeB
, given two functions,A => B
andB => A
.- Definition Classes
- Queue
-
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() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.