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.*:
Options
OptionDefaultMeaning
connectStringlocalhost:2181the ZooKeeper ensemble
sessionTimeout60sthe session timeout
connectionTimeout15sthe connection timeout
blockUntilConnectedWait10show long open waits for the first connection
retry.baseSleepTime100msthe first pause of Curator's exponential backoff retry
retry.maxRetries5the retries of a connection loss
retry.maxSleep500msthe 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 Details

  • Constructor Details

    • ZookeeperStoreProvider

      public ZookeeperStoreProvider()
  • Method Details

    • type

      public String type()
      Specified by:
      type in interface me.ahoo.cosid.store.StoreProvider
    • options

      public Set<String> options()
      Specified by:
      options in interface me.ahoo.cosid.store.StoreProvider
    • open

      public me.ahoo.cosid.store.Store open(me.ahoo.cosid.store.StoreConfig config)
      Specified by:
      open in interface me.ahoo.cosid.store.StoreProvider