Constructor and Description |
---|
ZooCacheFactory() |
Modifier and Type | Method and Description |
---|---|
ZooCache |
getZooCache(String zooKeepers,
int sessionTimeout)
Gets a
ZooCache . |
ZooCache |
getZooCache(String zooKeepers,
int sessionTimeout,
org.apache.zookeeper.Watcher watcher)
Gets a watched
ZooCache . |
public ZooCache getZooCache(String zooKeepers, int sessionTimeout)
ZooCache
. The same object may be returned for multiple calls with the same
arguments.zooKeepers
- comma-separated list of ZooKeeper host[:port]ssessionTimeout
- session timeoutpublic ZooCache getZooCache(String zooKeepers, int sessionTimeout, org.apache.zookeeper.Watcher watcher)
ZooCache
. If the watcher is null, then the same (unwatched) object may
be returned for multiple calls with the same remaining arguments.zooKeepers
- comma-separated list of ZooKeeper host[:port]ssessionTimeout
- session timeoutwatcher
- watcher (optional)Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.