|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.accumulo.fate.zookeeper.ZooCache
public class ZooCache
A cache for values stored in ZooKeeper. Values are kept up to date as they change.
| Constructor Summary | |
|---|---|
ZooCache(String zooKeepers,
int sessionTimeout)
Creates a new cache. |
|
ZooCache(String zooKeepers,
int sessionTimeout,
org.apache.zookeeper.Watcher watcher)
Creates a new cache. |
|
ZooCache(ZooReader reader,
org.apache.zookeeper.Watcher watcher)
Creates a new cache. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears this cache. |
void |
clear(String zPath)
Clears this cache of all information about nodes rooted at the given path. |
byte[] |
get(String zPath)
Gets data at the given path. |
byte[] |
get(String zPath,
org.apache.zookeeper.data.Stat stat)
Gets data at the given path, filling status information into the given Stat object. |
List<String> |
getChildren(String zPath)
Gets the children of the given node. |
static ZooCache |
getInstance(String zooKeepers,
int sessionTimeout)
Deprecated. Use ZooCacheFactory instead. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ZooCache(String zooKeepers,
int sessionTimeout)
zooKeepers - comma-separated list of ZooKeeper host[:port]ssessionTimeout - ZooKeeper session timeout
public ZooCache(String zooKeepers,
int sessionTimeout,
org.apache.zookeeper.Watcher watcher)
zooKeepers - comma-separated list of ZooKeeper host[:port]ssessionTimeout - ZooKeeper session timeoutwatcher - watcher object
public ZooCache(ZooReader reader,
org.apache.zookeeper.Watcher watcher)
reader - ZooKeeper readerwatcher - watcher object| Method Detail |
|---|
public List<String> getChildren(String zPath)
zPath - path of node
public byte[] get(String zPath)
zPath - path to get
public byte[] get(String zPath,
org.apache.zookeeper.data.Stat stat)
Stat object. A watch is established by this call.
zPath - path to getstat - status object to populate
public void clear()
public void clear(String zPath)
zPath - path of top node
@Deprecated
public static ZooCache getInstance(String zooKeepers,
int sessionTimeout)
ZooCacheFactory instead.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||