scalaz.stream.async.mutable

Queue

trait Queue[A] extends AnyRef

Asynchronous queue interface. Operations are all nonblocking in their implementations, but may be 'semantically' blocking. For instance, a queue may have a bound on its size, in which case enqueuing may block until there is an offsetting dequeue.

Source
Queue.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Queue
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def dequeue: Process[Task, A]

    Provides a process that dequeue from this queue.

    Provides a process that dequeue from this queue. When multiple consumers dequeue from this queue, they dequeue in first-come, first-serve order.

    Please use Topic instead of Queue when all subscribers need to see each value enqueued.

    This process is equivalent to dequeueBatch(1).

  2. abstract def dequeueAvailable: Process[Task, Seq[A]]

    Equivalent to dequeueBatch with an infinite limit.

    Equivalent to dequeueBatch with an infinite limit. Only use this method if your underlying algebra (A) has some sort of constant time "natural batching"! If processing a chunk of size n is linearly more expensive than processing a chunk of size 1, you should always use dequeueBatch with some small limit, otherwise you will disrupt fairness in the nondeterministic merge combinators.

  3. abstract def dequeueBatch(limit: Int): Process[Task, Seq[A]]

    Provides a process that dequeues in chunks.

    Provides a process that dequeues in chunks. Whenever *n* elements are available in the queue, min(n, limit) elements will be dequeud and produced as a single Seq. Note that this naturally does not *guarantee* that limit items are returned in every chunk. If only one element is available, that one element will be returned in its own sequence. This method basically just allows a consumer to "catch up" to a rapidly filling queue in the case where some sort of batching logic is applicable.

  4. abstract def enqueue: Sink[Task, A]

    A Sink for enqueueing values to this Queue.

  5. abstract def enqueueAll(xa: Seq[A]): Task[Unit]

    Enqueue multiple A values in this queue.

    Enqueue multiple A values in this queue. This has same semantics as sequencing repeated calls to enqueueOne.

  6. abstract def enqueueOne(a: A): Task[Unit]

    Enqueue one element in this Queue.

    Enqueue one element in this Queue. Resulting task will terminate with failure if queue is closed or failed. Please note this will get completed _after_ a has been successfully enqueued.

    a

    A to enqueue

  7. abstract def size: immutable.Signal[Int]

    The time-varying size of this Queue.

    The time-varying size of this Queue. This signal refreshes only when size changes. Offsetting enqueues and dequeues may not result in refreshes.

  8. abstract def upperBound: Option[Int]

    The size bound on the queue.

    The size bound on the queue. Returns None if the queue is unbounded.

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from Queue[A] to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (Queue[A], B)

    Implicit information
    This member is added by an implicit conversion from Queue[A] to ArrowAssoc[Queue[A]] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def available: immutable.Signal[Int]

    Returns the available number of entries in the queue.

    Returns the available number of entries in the queue. Always returns Int.MaxValue when the queue is unbounded.

  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def close: Task[Unit]

    Closes this queue.

    Closes this queue. This halts the enqueue Sink and dequeue Process after any already-queued elements are drained.

    After this any enqueue will fail with Terminated(End), and the enqueue Sink will terminate with End.

  12. def ensuring(cond: (Queue[A]) ⇒ Boolean, msg: ⇒ Any): Queue[A]

    Implicit information
    This member is added by an implicit conversion from Queue[A] to Ensuring[Queue[A]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: (Queue[A]) ⇒ Boolean): Queue[A]

    Implicit information
    This member is added by an implicit conversion from Queue[A] to Ensuring[Queue[A]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean, msg: ⇒ Any): Queue[A]

    Implicit information
    This member is added by an implicit conversion from Queue[A] to Ensuring[Queue[A]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: Boolean): Queue[A]

    Implicit information
    This member is added by an implicit conversion from Queue[A] to Ensuring[Queue[A]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  18. def fail(rsn: Throwable): Task[Unit]

    Like kill, except it terminates with supplied reason.

  19. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from Queue[A] to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  21. def full: immutable.Signal[Boolean]

    Returns true when the queue has reached its upper size bound.

    Returns true when the queue has reached its upper size bound. Always returns false when the queue is unbounded.

  22. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  24. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  25. def kill: Task[Unit]

    Kills the queue.

    Kills the queue. Unlike close, this kills all dequeuers immediately. Any subsequent enqueues will fail with Terminated(Kill). The returned Task will completed once all dequeuers and enqueuers have been signalled.

  26. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  30. def toString(): String

    Definition Classes
    AnyRef → Any
  31. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. def [B](y: B): (Queue[A], B)

    Implicit information
    This member is added by an implicit conversion from Queue[A] to ArrowAssoc[Queue[A]] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from Queue[A] to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (queue: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from Queue[A] to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (queue: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: Queue[A]

    Implicit information
    This member is added by an implicit conversion from Queue[A] to ArrowAssoc[Queue[A]] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (queue: ArrowAssoc[Queue[A]]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: Queue[A]

    Implicit information
    This member is added by an implicit conversion from Queue[A] to Ensuring[Queue[A]] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (queue: Ensuring[Queue[A]]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Queue[A] to StringAdd

Inherited by implicit conversion any2stringfmt from Queue[A] to StringFormat

Inherited by implicit conversion any2ArrowAssoc from Queue[A] to ArrowAssoc[Queue[A]]

Inherited by implicit conversion any2Ensuring from Queue[A] to Ensuring[Queue[A]]

Ungrouped