public final class MessageBuffer
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
MessageBuffer |
append(java.lang.Object message,
ActorRef ref)
Add one element to the end of the message buffer.
|
void |
dropHead()
Remove the first element of the message buffer.
|
static MessageBuffer |
empty()
Create an empty message buffer.
|
void |
foreach(scala.Function2<java.lang.Object,ActorRef,scala.runtime.BoxedUnit> f)
Iterate over all elements of the buffer and apply a function to each element.
|
void |
forEach(Procedure2<java.lang.Object,ActorRef> f)
Java API
|
Pair<java.lang.Object,ActorRef> |
getHead()
Java API
|
scala.Tuple2<java.lang.Object,ActorRef> |
head()
Return the first element of the message buffer.
|
boolean |
isEmpty()
Check if the message buffer is empty.
|
boolean |
nonEmpty()
Check if the message buffer is not empty.
|
int |
size()
How many elements are in the message buffer.
|
public static MessageBuffer empty()
public boolean isEmpty()
public boolean nonEmpty()
public int size()
public MessageBuffer append(java.lang.Object message, ActorRef ref)
message
- the message to bufferref
- the actor to bufferpublic void dropHead()
public scala.Tuple2<java.lang.Object,ActorRef> head()
public Pair<java.lang.Object,ActorRef> getHead()
Return the first element of the message buffer.
public void foreach(scala.Function2<java.lang.Object,ActorRef,scala.runtime.BoxedUnit> f)
f
- the function to apply to each elementpublic void forEach(Procedure2<java.lang.Object,ActorRef> f)
Iterate over all elements of the buffer and apply a function to each element.
f
- the function to apply to each element