Added tests for usage of cluster actor plus code backing the test.

Added more cluster API to ReflectiveAccess.
Plus misc refactorings and cleanup.
This commit is contained in:
Jonas Bonér 2011-05-17 11:04:50 +02:00
parent 1396e2d571
commit 7cf3d0876d
12 changed files with 264 additions and 148 deletions

View file

@ -92,21 +92,6 @@ trait ClusterNodeMBean {
def getConfigElementKeys: Array[String]
}
/**
* Node address holds the node name and the cluster name and can be used as a hash lookup key for a Node instance.
*
* @author <a href="http://jonasboner.com">Jonas Bon&#233;r</a>
*/
final case class NodeAddress(
clusterName: String,
nodeName: String,
hostname: String = Cluster.lookupLocalhostName,
port: Int = Cluster.remoteServerPort) {
if ((nodeName eq null) || nodeName == "") throw new NullPointerException("Node name must not be null or empty string")
if ((clusterName eq null) || clusterName == "") throw new NullPointerException("Cluster name must not be null or empty string")
override def toString = "%s:%s:%s:%s".format(clusterName, nodeName, hostname, port)
}
/**
* Factory object for ClusterNode. Also holds global state such as configuration data etc.
*