ListRole¶
The idea of the ListRole is about to combine other roles (sub-roles) in the "and", "or" and "any N of" principle.
It stores the mode, the set of roles and the size of the quorum.
Basically, it has 3 types of modes:
- All
- Any
- Quorum
Mode: All¶
Role could be performed only if set of keys could play all sub-roles
Mode: Any¶
Role could be performed if set of keys could play any role of the list
Mode: Quorum¶
Role could be played if set of keys could play any quorrum set of roles, e.g. at least any N subroles, controlled by the #setQuorum method
h1.How To.
There are 3 options for creating a ListRole by API:
- constructor just with the role name;
- constructor with the role name, the set of roles, and mode (ALL or ANY modes available only!)
- constructor just for Quorum mode: role name, the set of roles and quorum size.
DSL:
- role: [name](String) quorum_size: [number](Integer) mode: [All, Any, Quorum) roles:
- [role1] ...