Class: ZK::EventHandlerSubscription

Inherits:
Object
  • Object
show all
Defined in:
lib/z_k/event_handler_subscription.rb

Overview

the subscription object that is passed back from subscribing to events.

See Also:

  • ZooKeeperEventHandler#subscribe

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#callbackObject

Returns the value of attribute callback.



6
7
8
# File 'lib/z_k/event_handler_subscription.rb', line 6

def callback
  @callback
end

#event_handlerObject

Returns the value of attribute event_handler.



6
7
8
# File 'lib/z_k/event_handler_subscription.rb', line 6

def event_handler
  @event_handler
end

#pathObject

Returns the value of attribute path.



6
7
8
# File 'lib/z_k/event_handler_subscription.rb', line 6

def path
  @path
end

Instance Method Details

#unsubscribeObject Also known as: unregister

unsubscribe from the path or state you were watching

See Also:

  • ZooKeeperEventHandler#subscribe


16
17
18
# File 'lib/z_k/event_handler_subscription.rb', line 16

def unsubscribe
  @event_handler.unregister(self)
end