Add abstract method for dispatcher name
This commit is contained in:
parent
ae35e61a02
commit
f406cd98e0
2 changed files with 7 additions and 2 deletions
|
|
@ -68,6 +68,11 @@ trait MessageDispatcher {
|
|||
*/
|
||||
private[akka] def createMailbox(actorRef: ActorRef): AnyRef
|
||||
|
||||
/**
|
||||
* Name of this dispatcher.
|
||||
*/
|
||||
def name: String
|
||||
|
||||
/**
|
||||
* Attaches the specified actorRef to this dispatcher
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ import scala.annotation.tailrec
|
|||
|
||||
object CallingThreadDispatcher {
|
||||
|
||||
lazy val global = new CallingThreadDispatcher
|
||||
lazy val global = new CallingThreadDispatcher("global-calling-thread")
|
||||
|
||||
// PRIVATE DATA
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ object CallingThreadDispatcher {
|
|||
* @author Roland Kuhn
|
||||
* @since 1.1
|
||||
*/
|
||||
class CallingThreadDispatcher(val warnings: Boolean = true) extends MessageDispatcher {
|
||||
class CallingThreadDispatcher(val name: String = "calling-thread", val warnings: Boolean = true) extends MessageDispatcher {
|
||||
import CallingThreadDispatcher._
|
||||
|
||||
private[akka] override def createMailbox(actor: ActorRef) = new CallingThreadMailbox
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue