scala.actors

class MessageQueue

[source: scala/actors/MessageQueue.scala]

@serializable

@SerialVersionUID(2168935872884095767L)

@deprecated("this class is going to be removed in a future release")

class MessageQueue(protected val label : java.lang.String)
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.
Author
Philipp Haller
Value Summary
protected var first : MessageQueueElement
protected var last : MessageQueueElement
Method Summary
def append (msg : Any, session : OutputChannel[Any]) : Unit
protected def changeSize (diff : Int) : Unit
def extractFirst (p : (Any, OutputChannel[Any]) => Boolean) : MessageQueueElement
Extracts the first message that satisfies the predicate p or null if p fails for all of them.
def foldLeft [B](z : B)(f : (B, Any) => B) : B
def foreach (f : (Any, OutputChannel[Any]) => Unit) : Unit
def get (n : Int)(p : (Any) => Boolean) : Option[Any]
Returns the n-th message that satisfies the predicate p without removing it.
final def isEmpty : Boolean
def remove (n : Int)(p : (Any, OutputChannel[Any]) => Boolean) : Option[(Any, OutputChannel[Any])]
Removes the n-th message that satisfies the predicate p.
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
protected var first : MessageQueueElement

protected var last : MessageQueueElement

Method Details
def size : Int

final def isEmpty : Boolean

protected def changeSize(diff : Int) : Unit

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

def foreach(f : (Any, OutputChannel[Any]) => Unit) : Unit

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

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

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

def extractFirst(p : (Any, OutputChannel[Any]) => Boolean) : MessageQueueElement
Extracts the first message that satisfies the predicate p or null if p fails for all of them.