| career | drupal | java | mac | mysql | perl | scala | uml | unix  

Akka/Scala example source code file (Table.scala)

This example Akka source code file (Table.scala) is included in my "Source Code Warehouse" project. The intent of this project is to help you more easily find Akka and Scala source code examples by using tags.

All credit for the original source code belongs to; I'm just trying to make examples easier to find. (For my Scala work, see my Scala examples and tutorials.)

Akka tags/keywords

actor, akka, chopstick, int, table

The Table.scala Akka example source code

Copyright 2013 Crossing-Tech

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
   limitations under the License.
package akka.sample.osgi.internal

import{ Props, Actor }

class Table extends Actor {
  val chopsticks = for (i <- 1 to 5) yield context.actorOf(Props[Chopstick], "Chopstick" + i)

  def receive = {
    case x: Int => sender() ! ((chopsticks(x), chopsticks((x + 1) % 5)))

Other Akka source code examples

Here is a short list of links related to this Akka Table.scala source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller


new blog posts


Copyright 1998-2021 Alvin Alexander,
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.