format source with scalafmt
This commit is contained in:
parent
0f40491d42
commit
ce404e4f53
1669 changed files with 43208 additions and 35404 deletions
|
|
@ -225,21 +225,21 @@ object DispatcherDocSpec {
|
|||
// We inherit, in this case, from UnboundedStablePriorityMailbox
|
||||
// and seed it with the priority generator
|
||||
class MyPrioMailbox(settings: ActorSystem.Settings, config: Config)
|
||||
extends UnboundedStablePriorityMailbox(
|
||||
// Create a new PriorityGenerator, lower prio means more important
|
||||
PriorityGenerator {
|
||||
// 'highpriority messages should be treated first if possible
|
||||
case 'highpriority => 0
|
||||
extends UnboundedStablePriorityMailbox(
|
||||
// Create a new PriorityGenerator, lower prio means more important
|
||||
PriorityGenerator {
|
||||
// 'highpriority messages should be treated first if possible
|
||||
case 'highpriority => 0
|
||||
|
||||
// 'lowpriority messages should be treated last if possible
|
||||
case 'lowpriority => 2
|
||||
// 'lowpriority messages should be treated last if possible
|
||||
case 'lowpriority => 2
|
||||
|
||||
// PoisonPill when no other left
|
||||
case PoisonPill => 3
|
||||
// PoisonPill when no other left
|
||||
case PoisonPill => 3
|
||||
|
||||
// We default to 1, which is in between high and low
|
||||
case otherwise => 1
|
||||
})
|
||||
// We default to 1, which is in between high and low
|
||||
case otherwise => 1
|
||||
})
|
||||
//#prio-mailbox
|
||||
|
||||
//#control-aware-mailbox-messages
|
||||
|
|
@ -258,13 +258,11 @@ object DispatcherDocSpec {
|
|||
import akka.dispatch.RequiresMessageQueue
|
||||
import akka.dispatch.BoundedMessageQueueSemantics
|
||||
|
||||
class MyBoundedActor extends MyActor
|
||||
with RequiresMessageQueue[BoundedMessageQueueSemantics]
|
||||
class MyBoundedActor extends MyActor with RequiresMessageQueue[BoundedMessageQueueSemantics]
|
||||
//#required-mailbox-class
|
||||
|
||||
//#require-mailbox-on-actor
|
||||
class MySpecialActor extends Actor
|
||||
with RequiresMessageQueue[MyUnboundedMessageQueueSemantics] {
|
||||
class MySpecialActor extends Actor with RequiresMessageQueue[MyUnboundedMessageQueueSemantics] {
|
||||
//#require-mailbox-on-actor
|
||||
def receive = {
|
||||
case _ =>
|
||||
|
|
@ -373,8 +371,7 @@ class DispatcherDocSpec extends AkkaSpec(DispatcherDocSpec.config) {
|
|||
case x => log.info(x.toString)
|
||||
}
|
||||
}
|
||||
val a = system.actorOf(Props(classOf[Logger], this).withDispatcher(
|
||||
"prio-dispatcher"))
|
||||
val a = system.actorOf(Props(classOf[Logger], this).withDispatcher("prio-dispatcher"))
|
||||
|
||||
/*
|
||||
* Logs:
|
||||
|
|
@ -410,8 +407,7 @@ class DispatcherDocSpec extends AkkaSpec(DispatcherDocSpec.config) {
|
|||
case x => log.info(x.toString)
|
||||
}
|
||||
}
|
||||
val a = system.actorOf(Props(classOf[Logger], this).withDispatcher(
|
||||
"control-aware-dispatcher"))
|
||||
val a = system.actorOf(Props(classOf[Logger], this).withDispatcher("control-aware-dispatcher"))
|
||||
|
||||
/*
|
||||
* Logs:
|
||||
|
|
@ -427,8 +423,7 @@ class DispatcherDocSpec extends AkkaSpec(DispatcherDocSpec.config) {
|
|||
}
|
||||
|
||||
"require custom mailbox on dispatcher" in {
|
||||
val myActor = system.actorOf(Props[MyActor].withDispatcher(
|
||||
"custom-dispatcher"))
|
||||
val myActor = system.actorOf(Props[MyActor].withDispatcher("custom-dispatcher"))
|
||||
}
|
||||
|
||||
"require custom mailbox on actor" in {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue