Sha256: cfb05c2bf7ed7055f10d1d305b0f584d18771daf5e31e971765d457b19cb5545
Contents?: true
Size: 846 Bytes
Versions: 16
Compression:
Stored size: 846 Bytes
Contents
# This monkey-patch must be removed when ticket #44 has been included in # an updated ZooKeeper Gem # Ticket: https://github.com/slyphon/zookeeper/issues/44 # Pull Request: https://github.com/slyphon/zookeeper/pull/45 module Zookeeper class JavaBase def get(req_id, path, callback, watcher) handle_keeper_exception do watch_cb = watcher ? create_watcher(req_id, path) : false if callback jzk.getData(path, watch_cb, JavaCB::DataCallback.new(req_id), event_queue) [Code::Ok, nil, nil] # the 'nil, nil' isn't strictly necessary here else # sync stat = JZKD::Stat.new value = jzk.getData(path, watch_cb, stat) data = String.from_java_bytes(value) unless value.nil? [Code::Ok, data, stat.to_hash] end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems