public interface TreeCacheSelector
Controls which nodes a TreeCache processes. When iterating
over the children of a parent node, a given node's children are
queried only if traverseChildren(String)
returns true.
When caching the list of nodes for a parent node, a given node is
stored only if acceptChild(String)
returns true.
E.g. Given:
root n1-a n1-b n2-a n2-b n3-a n1-c n1-dYou could have a TreeCache only work with the nodes: n1-a, n1-b, n2-a, n2-b, n1-d by returning false from traverseChildren() for "/root/n1-b/n2-b" and returning false from acceptChild("/root/n1-c").
Modifier and Type | Method and Description |
---|---|
boolean |
acceptChild(String fullPath)
Return true if this node should be returned from the cache
|
boolean |
traverseChildren(String fullPath)
Return true if children of this path should be cached.
|
boolean traverseChildren(String fullPath)
fullPath
- full path of the ZNodeboolean acceptChild(String fullPath)
fullPath
- full path of the ZNodeCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.