Cluster node roles, see #3049
* Config of node roles cluster.role * Cluster router configurable with use-role * RoleLeaderChanged event * Cluster singleton per role * Cluster only starts once all required per-role node counts are reached, role.<role-name>.min-nr-of-members config * Update documentation and make use of the roles in the examples
This commit is contained in:
parent
6e8125a46e
commit
7eac88f372
49 changed files with 870 additions and 481 deletions
|
|
@ -73,6 +73,17 @@ class Cluster(val system: ExtendedActorSystem) extends Extension {
|
|||
format(system, other.getClass.getName))
|
||||
}
|
||||
|
||||
/**
|
||||
* roles that this member has
|
||||
*/
|
||||
def selfRoles: Set[String] = settings.Roles
|
||||
|
||||
/**
|
||||
* Java API: roles that this member has
|
||||
*/
|
||||
def getSelfRoles: java.util.Set[String] =
|
||||
scala.collection.JavaConverters.setAsJavaSetConverter(selfRoles).asJava
|
||||
|
||||
private val _isTerminated = new AtomicBoolean(false)
|
||||
private val log = Logging(system, "Cluster")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue