Click or drag to resize
UntypedActorBecome Method (UntypedReceive, Boolean)
Changes the Actor's behavior to become the new Receive(Object) handler. This method acts upon the behavior stack as follows:

if discardOld==true it will replace the current behavior (i.e. the top element)

if discardOld==false it will keep the current behavior and push the given one atop

The default of replacing the current behavior on the stack has been chosen to avoid memory leaks in case client code is written without consulting this documentation first (i.e. always pushing new behaviors and never issuing an Unbecome)

Namespace: Akka.Actor
Assembly: Akka (in Akka.dll) Version: 0.8.0.0 (0.8.0.0)
Syntax
protected void Become(
	UntypedReceive receive,
	bool discardOld = true
)

Parameters

receive
Type: Akka.ActorUntypedReceive
The receive delegate.
discardOld (Optional)
Type: SystemBoolean
If true it will replace the current behavior; otherwise it will keep the current behavior and it can be reverted using Unbecome
See Also