Package me.ahoo.cosid.store.zookeeper
Class ZookeeperStoreProvider
java.lang.Object
me.ahoo.cosid.store.zookeeper.ZookeeperStoreProvider
- All Implemented Interfaces:
me.ahoo.cosid.store.StoreProvider
public final class ZookeeperStoreProvider
extends Object
implements me.ahoo.cosid.store.StoreProvider
Opens
ZookeeperStores, type "zookeeper" (06-stores.md ยง1). The client is the CuratorFramework in
StoreConfig.client(), which the caller owns; without one the provider builds and starts a client from the
options, which the store closes. The options replace 4.x cosid.zookeeper.*:
| Option | Default | Meaning |
|---|---|---|
connectString | localhost:2181 | the ZooKeeper ensemble |
sessionTimeout | 60s | the session timeout |
connectionTimeout | 15s | the connection timeout |
blockUntilConnectedWait | 10s | how long open waits for the first connection |
retry.baseSleepTime | 100ms | the first pause of Curator's exponential backoff retry |
retry.maxRetries | 5 | the retries of a connection loss |
retry.maxSleep | 500ms | the longest pause between retries |
Durations are a Duration, a number of milliseconds, or text: ISO-8601 (PT5S) or a number with
ms, s, m or h. The store timeout bounds every operation (Curator has no per-operation
timeout of its own).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
TYPE
- See Also:
-
-
Constructor Details
-
ZookeeperStoreProvider
public ZookeeperStoreProvider()
-
-
Method Details
-
type
- Specified by:
typein interfaceme.ahoo.cosid.store.StoreProvider
-
options
- Specified by:
optionsin interfaceme.ahoo.cosid.store.StoreProvider
-
open
public me.ahoo.cosid.store.Store open(me.ahoo.cosid.store.StoreConfig config) - Specified by:
openin interfaceme.ahoo.cosid.store.StoreProvider
-