scala.actors

class MessageQueue

[source: scala/actors/MessageQueue.scala]

@serializable

class MessageQueue
extends AnyRef
The class MessageQueue provides an efficient implementation of a message queue specialized for this actor library. Classes in this package are supposed to be the only clients of this class.
Version
0.9.9
Author
Philipp Haller
Value Summary
var first : MessageQueueElement
var last : MessageQueueElement
Method Summary
def append (msg : Any, session : OutputChannel[Any]) : Unit
protected def changeSize (diff : Int) : Unit
def extractFirst (p : (Any) => Boolean) : MessageQueueElement
def foldLeft [B](z : B)(f : (B, Any) => B) : B
def get (n : Int)(p : (Any) => Boolean) : Option[Any]
Returns the n-th msg that satisfies the predicate without removing it.
def isEmpty : Boolean
def remove (n : Int)(p : (Any) => Boolean) : Option[(Any, OutputChannel[Any])]
Removes the n-th msg that satisfies the predicate.
def size : Int
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Value Details
var first : MessageQueueElement

var last : MessageQueueElement

Method Details
def isEmpty : Boolean

def size : Int

protected def changeSize(diff : Int) : Unit

def append(msg : Any, session : OutputChannel[Any]) : Unit

def foldLeft[B](z : B)(f : (B, Any) => B) : B

def get(n : Int)(p : (Any) => Boolean) : Option[Any]
Returns the n-th msg that satisfies the predicate without removing it.

def remove(n : Int)(p : (Any) => Boolean) : Option[(Any, OutputChannel[Any])]
Removes the n-th msg that satisfies the predicate.

def extractFirst(p : (Any) => Boolean) : MessageQueueElement