-
Notifications
You must be signed in to change notification settings - Fork 430
Node Cache
samuelgmartinez edited this page Feb 14, 2013
·
2 revisions
A Node Cache is used to watch a ZNode. Whenever the data is modified or the ZNode is deleted, the Node Cache will change its state to contain the current data (or null if ZNode was deleted).
- NodeCache
- NodeCacheListener
- ChildData
public NodeCache(CuratorFramework client,
String path)
Parameters:
client - the client
path - path to cache
The cache must be started by calling start(). Call close() when you are through with the cache.
At any time, call getCurrentData() to get the current state of the cache. You can also register to be notified when a change occurs by calling getListenable() and then:
public void addListener(NodeCacheListener listener)
Add a change listener
Parameters:
listener - the listener
- Curator
- Javadoc
- Coverage Report
- Getting Started
- Examples
- FAQ
- Client
- Framework
-
Recipes
- Leader Latch
- Leader Election
- Shared Reentrant Lock
- Shared Lock
- Shared Reentrant Read Write Lock
- Shared Semaphore
- Multi Shared Lock
- Distributed Queue
- Distributed Id Queue
- Distributed Priority Queue
- Distributed Delay Queue
- Simple Distributed Queue
- Barrier
- Double Barrier
- Shared counter
- Distributed Atomic Long
- Path Cache
- Node Cache
- Utilities – Test Server, Test Cluster, ZKPaths, EnsurePath, QueueSharder, Reaper, ChildReaper
- Tech Notes
- Errors
- Exhibitor Integration
- Extensions
- Logging and Tracing