Copyright | (C) 2013 Diego Souza |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Diego Souza <dsouza@c0d3.xxx> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Zookeeper client library
Description
Example
Notes
Connection
:: String | The zookeeper endpoint to connect to. This is given as-is to the underlying C API. Briefly, host:port separated by comma. At the end, you may define an optional chroot, like the following: localhost:2181,localhost:2182/foobar |
-> Timeout | The session timeout (milliseconds) |
-> Maybe Watcher | The global watcher function. When notifications are triggered this function will be invoked |
-> Maybe ClientID | The id of a previously established session that this client will be reconnecting to |
-> Int | The number of stripes (distinct sub-pools) to maintain. The smallest acceptable value is 1. |
-> NominalDiffTime | Amount of time for which an unused resource is kept open. The smallest acceptable value is 0.5 seconds. The elapsed time before destroying a resource may be a little longer than requested, as the reaper thread wakes at 1-second intervals. |
-> Int | Maximum number of resources to keep open per stripe. The smallest acceptable value is 1. Requests for resources will block if this limit is reached on a single stripe, even if other stripes have idle resources available. |
-> IO (Pool Zookeeper) |
Connects to the zookeeper cluster. This function may throw an exception if a valid zookeeper handle could not be created.
The connection is terminated right before this function returns.