Scala Library
|
|
scala/actors/MessageQueue.scala
]
class
MessageQueue(protected val
label : java.lang.String)
extends
AnyRefMessageQueue
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.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 |
Method Details |
def
size : Int
final
def
isEmpty : Boolean
def
append(msg : Any, session : OutputChannel[Any]) : Unit
def
foreach(f : (Any, OutputChannel[Any]) => Unit) : Unit
p
without removing it.
def
remove(n : Int)(p : (Any, OutputChannel[Any]) => Boolean) : Option[(Any, OutputChannel[Any])]
p
.
def
extractFirst(p : (Any, OutputChannel[Any]) => Boolean) : MessageQueueElement
p
or null
if p
fails for all of them.
Scala Library
|
|