Packages

c

akka.dispatch

AbstractBoundedNodeQueue

abstract class AbstractBoundedNodeQueue[T] extends AnyRef

Lock-free bounded non-blocking multiple-producer single-consumer queue based on the works of:

Andriy Plokhotnuyk (https://github.com/plokhotnyuk)

  • https://github.com/plokhotnyuk/actors/blob/2e65abb7ce4cbfcb1b29c98ee99303d6ced6b01f/src/test/scala/akka/dispatch/Mailboxes.scala (Apache V2: https://github.com/plokhotnyuk/actors/blob/master/LICENSE)

Dmitriy Vyukov's non-intrusive MPSC queue:

  • http://www.1024cores.net/home/lock-free-algorithms/queues/non-intrusive-mpsc-node-based-queue (Simplified BSD)
Source
AbstractBoundedNodeQueue.java
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AbstractBoundedNodeQueue
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def add(value: T): Boolean
  2. final def addNode(n: Node[T]): Boolean
  3. final def capacity(): Int

    returns

    the maximum capacity of this queue

  4. final def isEmpty(): Boolean
  5. final def peek(): T

    returns

    the first value of this queue, null if empty

  6. final def poll(): T

    Removes the first element of this queue if any

    Removes the first element of this queue if any

    returns

    the value of the first element of the queue, null if empty

  7. final def pollNode(): Node[T]

    Removes the first element of this queue if any

    Removes the first element of this queue if any

    returns

    the Node of the first element of the queue, null if empty

  8. final def size(): Int

    Returns an approximation of the queue's "current" size