Various corrections

This commit is contained in:
Endre Sándor Varga 2017-03-27 13:25:26 +02:00
parent 435d95bcdc
commit 4ffb4d30b9
11 changed files with 382 additions and 195 deletions

View file

@ -10,7 +10,7 @@ import tutorial_3.DeviceManager.RequestTrackDevice
object DeviceManager {
def props(): Props = Props(new DeviceManager)
case class RequestTrackDevice(groupId: String, deviceId: String)
final case class RequestTrackDevice(groupId: String, deviceId: String)
case object DeviceRegistered
}
@ -28,7 +28,7 @@ class DeviceManager extends Actor with ActorLogging {
case Some(ref) =>
ref forward trackMsg
case None =>
log.info(s"Creating device group actor for $groupId")
log.info("Creating device group actor for {}", groupId)
val groupActor = context.actorOf(DeviceGroup.props(groupId), "group-" + groupId)
context.watch(groupActor)
groupActor forward trackMsg
@ -38,7 +38,7 @@ class DeviceManager extends Actor with ActorLogging {
case Terminated(groupActor) =>
val groupId = actorToGroupId(groupActor)
log.info(s"Device group actor for $groupId has been terminated")
log.info("Device group actor for {} has been terminated", groupId)
actorToGroupId -= groupActor
groupIdToActor -= groupId