Updated samples and tutorial to Akka 2.0. Added projects to SBT project file. Fixes #1278

This commit is contained in:
Henrik Engstrom 2011-11-25 14:49:09 +01:00
parent c0d3c523e2
commit 823a68ac0f
33 changed files with 1291 additions and 1209 deletions

View file

@ -11,6 +11,7 @@ import scala.annotation.tailrec
import java.util.concurrent.atomic.{ AtomicReference, AtomicInteger }
import java.net.InetSocketAddress
import akka.remote.RemoteAddress
import collection.JavaConverters
/**
* An Iterable that also contains a version.
@ -85,6 +86,10 @@ trait ConnectionManager {
*/
class LocalConnectionManager(initialConnections: Iterable[ActorRef]) extends ConnectionManager {
def this(linkedList: java.util.LinkedList[ActorRef]) {
this(JavaConverters.iterableAsScalaIterableConverter(linkedList).asScala)
}
case class State(version: Long, connections: Iterable[ActorRef]) extends VersionedIterable[ActorRef] {
def iterable = connections
}