Module: ZK::Extensions::Callbacks::WatcherCallbackExt
- Includes:
- ZookeeperConstants
- Defined in:
- lib/z_k/extensions.rb
Constant Summary collapse
- EVENT_NAME_MAP =
{ 1 => 'created', 2 => 'deleted', 3 => 'changed', 4 => 'child', -1 => 'session', -2 => 'notwatching', }.freeze
- STATES =
%w[connecting associating connected auth_failed expired_session].freeze
- EVENT_TYPES =
%w[created deleted changed child session notwatching].freeze
Instance Method Summary collapse
-
#node_event? ⇒ Boolean
has this watcher been called because of a change to a zookeeper node?.
-
#state_event? ⇒ Boolean
has this watcher been called because of a change in connection state?.
Instance Method Details
#node_event? ⇒ Boolean
has this watcher been called because of a change to a zookeeper node?
76 77 78 |
# File 'lib/z_k/extensions.rb', line 76 def node_event? path and not path.empty? end |
#state_event? ⇒ Boolean
has this watcher been called because of a change in connection state?
71 72 73 |
# File 'lib/z_k/extensions.rb', line 71 def state_event? path.nil? or path.empty? end |