diff --git a/akka-actor/src/main/scala/akka/actor/Deployer.scala b/akka-actor/src/main/scala/akka/actor/Deployer.scala index 55f1ab23a1..5a5834d8a6 100644 --- a/akka-actor/src/main/scala/akka/actor/Deployer.scala +++ b/akka-actor/src/main/scala/akka/actor/Deployer.scala @@ -31,7 +31,7 @@ trait ActorDeployer { */ object Deployer extends ActorDeployer { - val defaultAddress = Host(Config.hostname) +// val defaultAddress = Node(Config.nodename) lazy val instance: ActorDeployer = { val deployer = if (ClusterModule.isEnabled) ClusterModule.clusterDeployer else LocalDeployer @@ -183,9 +183,9 @@ object Deployer extends ActorDeployer { val address = tokenizer.nextElement.asInstanceOf[String] protocol match { - case "host" ⇒ Host(address) + //case "host" ⇒ Host(address) case "node" ⇒ Node(address) - case "ip" ⇒ IP(address) + //case "ip" ⇒ IP(address) case _ ⇒ raiseHomeConfigError() } } diff --git a/akka-actor/src/main/scala/akka/actor/DeploymentConfig.scala b/akka-actor/src/main/scala/akka/actor/DeploymentConfig.scala index c7dd94bbdb..5ee5b0a870 100644 --- a/akka-actor/src/main/scala/akka/actor/DeploymentConfig.scala +++ b/akka-actor/src/main/scala/akka/actor/DeploymentConfig.scala @@ -59,7 +59,7 @@ object DeploymentConfig { // -------------------------------- sealed trait Scope case class Clustered( - preferredNodes: Iterable[Home] = Vector(Host("localhost")), + preferredNodes: Iterable[Home] = Vector(Node(Config.nodename)), replicas: ReplicationFactor = ZeroReplicationFactor, replication: ReplicationScheme = Transient) extends Scope @@ -73,9 +73,9 @@ object DeploymentConfig { // --- Home // -------------------------------- sealed trait Home - case class Host(hostName: String) extends Home +// case class Host(hostName: String) extends Home case class Node(nodeName: String) extends Home - case class IP(ipAddress: String) extends Home +// case class IP(ipAddress: String) extends Home // -------------------------------- // --- Replicas @@ -138,13 +138,11 @@ object DeploymentConfig { def nodeNameFor(home: Home): String = home match { case Node(nodename) ⇒ nodename - case Host("localhost") ⇒ Config.nodename - case IP("0.0.0.0") ⇒ Config.nodename - case IP("127.0.0.1") ⇒ Config.nodename - case Host(hostname) ⇒ throw new UnsupportedOperationException( - "Specifying preferred node name by 'hostname' is not yet supported. Use the node name like: preferred-nodes = [\"node:node1\"]") - case IP(address) ⇒ throw new UnsupportedOperationException( - "Specifying preferred node name by 'IP address' is not yet supported. Use the node name like: preferred-nodes = [\"node:node1\"]") +// case Host("localhost") ⇒ Config.nodename +// case IP("0.0.0.0") ⇒ Config.nodename +// case IP("127.0.0.1") ⇒ Config.nodename +// case Host(hostname) ⇒ throw new UnsupportedOperationException("Specifying preferred node name by 'hostname' is not yet supported. Use the node name like: preferred-nodes = [\"node:node1\"]") +// case IP(address) ⇒ throw new UnsupportedOperationException("Specifying preferred node name by 'IP address' is not yet supported. Use the node name like: preferred-nodes = [\"node:node1\"]") } def isHomeNode(homes: Iterable[Home]): Boolean = homes exists (home ⇒ nodeNameFor(home) == Config.nodename) diff --git a/config/akka-reference.conf b/config/akka-reference.conf index ac0ebcf50c..9c03608a3d 100644 --- a/config/akka-reference.conf +++ b/config/akka-reference.conf @@ -51,9 +51,9 @@ akka { # default (if omitted) is local non-clustered actor preferred-nodes = ["node:node1"] # a list of preferred nodes for instantiating the actor instances on - # defined as: hostname, IP-address or node name - # available: "host:", "ip:" and "node:" - # default is "host:localhost" + # defined as node name + # available: + # "node:" replication-factor = 3 # number of actor instances in the cluster # available: positive integer (0-N) or the string "auto" for auto-scaling