Module: ZK::Client
- Defined in:
- lib/zk/client.rb,
lib/zk/client/base.rb,
lib/zk/client/threaded.rb,
lib/zk/client/unixisms.rb,
lib/zk/client/state_mixin.rb,
lib/zk/client/conveniences.rb
Overview
ACL support is pretty much unused currently. If anyone has suggestions, hints, use-cases, examples, etc. by all means please file a bug.
A ruby-friendly wrapper around the low-level zookeeper drivers.
You're probably looking for Base and Threaded.
Once you've had a look there, take a look at Conveniences, StateMixin, and Unixisms
Defined Under Namespace
Modules: Conveniences, StateMixin, Unixisms Classes: Base, Threaded
Constant Summary collapse
- DEFAULT_TIMEOUT =
10
Class Method Summary collapse
-
.new(*a) {|self| ... } ⇒ Threaded
Construct a new threaded client.
Class Method Details
.new(*a) {|self| ... } ⇒ Threaded
The :timeout
argument here is not the session_timeout for the
connection. rather it is the amount of time we wait for the connection
to be established. The session timeout exchanged with the server is
set to 10s by default in the C implemenation, and as of version 0.8.0
of slyphon-zookeeper has yet to be exposed as an option. That feature
is planned.
The documentation for 0.9.0 was incorrect in stating the number
of threads used to deliver events. There was one, unconfigurable,
event dispatch thread. In 1.0 the number of event delivery threads is
configurable, but still defaults to 1 and users are discouraged from
adjusting the value due to the complexity this introduces. In 1.1
there is a better option for achieving higher concurrency (see the
:thread
option)
The Management apologizes for any confusion this may have caused.
Construct a new threaded client.
Pay close attention to the :threaded
option, and have a look at the
EventDeliveryModel
page in the wiki for a discussion of the relative advantages and
disadvantages of the choices available. The default is safe, but the
alternative will likely provide better performance.
27 28 29 |
# File 'lib/zk/client.rb', line 27 def new(*a, &b) Threaded.new(*a, &b) end |