Class: ZooKeeper::Packet
Direct Known Subclasses
Instance Attribute Summary collapse
-
#watch_type ⇒ Object
readonly
Returns the value of attribute watch_type.
-
#watcher ⇒ Object
readonly
Returns the value of attribute watcher.
-
#xid ⇒ Object
readonly
Returns the value of attribute xid.
Attributes inherited from Operation
#callback, #op, #opcode, #request, #response
Instance Method Summary collapse
- #error(reason) ⇒ Object
-
#initialize(xid, op, opcode, request, response, watch_type, watcher, callback) ⇒ Packet
constructor
A new instance of Packet.
- #result(rc) ⇒ Object
Methods inherited from Operation
Constructor Details
#initialize(xid, op, opcode, request, response, watch_type, watcher, callback) ⇒ Packet
Returns a new instance of Packet.
82 83 84 85 86 |
# File 'lib/zkruby/protocol.rb', line 82 def initialize(xid,op,opcode,request,response,watch_type,watcher,callback) super(op,opcode,request,response,callback) @xid=xid; @watch_type = watch_type; @watcher = watcher end |
Instance Attribute Details
#watch_type ⇒ Object (readonly)
Returns the value of attribute watch_type.
80 81 82 |
# File 'lib/zkruby/protocol.rb', line 80 def watch_type @watch_type end |
#watcher ⇒ Object (readonly)
Returns the value of attribute watcher.
80 81 82 |
# File 'lib/zkruby/protocol.rb', line 80 def watcher @watcher end |
#xid ⇒ Object (readonly)
Returns the value of attribute xid.
80 81 82 |
# File 'lib/zkruby/protocol.rb', line 80 def xid @xid end |
Instance Method Details
#error(reason) ⇒ Object
89 90 91 |
# File 'lib/zkruby/protocol.rb', line 89 def error(reason) result(reason)[0..2] # don't need the watch end |