Module: ZK::Group
- Defined in:
- lib/zk-group.rb,
lib/zk-group/group.rb,
lib/zk-group/member.rb,
lib/zk-group/version.rb,
lib/zk-group/membership_subscription.rb
Overview
A Group is a basic membership primitive. You pick a name for the group, and then join, leave, and receive updates when group membership changes. You can also get a list of other members of the group.
Defined Under Namespace
Modules: Common Classes: Group, GroupExceptionTranslator, Member, MemberExceptionTranslator, MembershipSubscription
Constant Summary collapse
- DEFAULT_ROOT =
'/_zk/groups'
- DEFAULT_PREFIX =
'm'.freeze
- VERSION =
"0.1.1"
- @@mutex =
Mutex.new
Class Method Summary collapse
- .mutex ⇒ Object
- .new(*args) ⇒ Object
-
.zk_root ⇒ Object
The path under which all groups will be created.
-
.zk_root=(path) ⇒ Object
Sets the default global zk root path.
Class Method Details
.mutex ⇒ Object
12 13 14 |
# File 'lib/zk-group/group.rb', line 12 def mutex @@mutex end |
.new(*args) ⇒ Object
28 29 30 |
# File 'lib/zk-group/group.rb', line 28 def self.new(*args) ZK::Group::Group.new(*args) end |
.zk_root ⇒ Object
The path under which all groups will be created. defaults to DEFAULT_ROOT if not set
18 19 20 |
# File 'lib/zk-group/group.rb', line 18 def zk_root @@mutex.synchronize { @@zk_root ||= DEFAULT_ROOT } end |
.zk_root=(path) ⇒ Object
Sets the default global zk root path.
23 24 25 |
# File 'lib/zk-group/group.rb', line 23 def zk_root=(path) @@mutex.synchronize { @@zk_root = path.dup.freeze } end |