Wrap long lines, for pdf

This commit is contained in:
Patrik Nordwall 2013-05-29 17:20:18 +02:00
parent 7c1ab68263
commit 95366cb585
27 changed files with 108 additions and 67 deletions

View file

@ -11,7 +11,8 @@ import org.scalatest.{ BeforeAndAfterAll, WordSpec }
import org.scalatest.matchers.MustMatchers
import akka.testkit._
//#typed-actor-impl
import java.lang.String.{ valueOf println } //Mr funny man avoids printing to stdout AND keeping docs alright
//Mr funny man avoids printing to stdout AND keeping docs alright
import java.lang.String.{ valueOf println }
import akka.actor.ActorRef
//#typed-actor-iface

View file

@ -191,7 +191,8 @@ 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
//#mailbox-implementation-example
@ -301,7 +302,8 @@ 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:

View file

@ -182,7 +182,8 @@ package docs.serialization {
}
def serializeTo(ref: ActorRef, remote: Address): String =
ref.path.toSerializationFormatWithAddress(ExternalAddress(extendedSystem).addressFor(remote))
ref.path.toSerializationFormatWithAddress(ExternalAddress(extendedSystem).
addressFor(remote))
//#external-address
}
@ -197,7 +198,8 @@ package docs.serialization {
}
def serializeAkkaDefault(ref: ActorRef): String =
ref.path.toSerializationFormatWithAddress(ExternalAddress(theActorSystem).addressForAkka)
ref.path.toSerializationFormatWithAddress(ExternalAddress(theActorSystem).
addressForAkka)
//#external-address-default
}
}

View file

@ -146,8 +146,8 @@ object TestKitUsageSpec {
* like to test that the interesting value is received and that you cant
* be bothered with the rest
*/
class SequencingActor(next: ActorRef, head: immutable.Seq[String], tail: immutable.Seq[String])
extends Actor {
class SequencingActor(next: ActorRef, head: immutable.Seq[String],
tail: immutable.Seq[String]) extends Actor {
def receive = {
case msg {
head foreach { next ! _ }

View file

@ -99,7 +99,8 @@ object ZeromqDocSpec {
def receive = {
// the first frame is the topic, second is the message
case m: ZMQMessage if m.frames(0).utf8String == "health.heap"
val Heap(timestamp, used, max) = ser.deserialize(m.frames(1).toArray, classOf[Heap]).get
val Heap(timestamp, used, max) =
ser.deserialize(m.frames(1).toArray, classOf[Heap]).get
if ((used.toDouble / max) > 0.9) count += 1
else count = 0
if (count > 10) log.warning("Need more memory, using {} %",