| Modifier and Type | Method and Description |
|---|---|
TreeCache |
build()
Builds the
TreeCache based on configured values. |
TreeCache.Builder |
setCacheData(boolean cacheData)
Sets whether or not to cache byte data per node; default
true. |
TreeCache.Builder |
setCreateParentNodes(boolean createParentNodes)
By default, TreeCache does not auto-create parent nodes for the cached path.
|
TreeCache.Builder |
setDataIsCompressed(boolean dataIsCompressed)
Sets whether or to decompress node data; default
false. |
TreeCache.Builder |
setExecutor(org.apache.curator.utils.CloseableExecutorService executorService)
Sets the executor to publish events; a default executor will be created if not specified.
|
TreeCache.Builder |
setExecutor(ExecutorService executorService)
Sets the executor to publish events; a default executor will be created if not specified.
|
TreeCache.Builder |
setExecutor(ThreadFactory threadFactory)
Sets the executor to publish events; a default executor will be created if not specified.
|
TreeCache.Builder |
setMaxDepth(int maxDepth)
Sets the maximum depth to explore/watch.
|
TreeCache.Builder |
setSelector(TreeCacheSelector selector)
By default,
DefaultTreeCacheSelector is used. |
public TreeCache.Builder setCacheData(boolean cacheData)
true.public TreeCache.Builder setDataIsCompressed(boolean dataIsCompressed)
false.public TreeCache.Builder setExecutor(ThreadFactory threadFactory)
public TreeCache.Builder setExecutor(ExecutorService executorService)
public TreeCache.Builder setExecutor(org.apache.curator.utils.CloseableExecutorService executorService)
public TreeCache.Builder setMaxDepth(int maxDepth)
maxDepth of 0 will watch only
the root node (like NodeCache); a maxDepth of 1 will watch the
root node and its immediate children (kind of like PathChildrenCache.
Default: Integer.MAX_VALUEpublic TreeCache.Builder setCreateParentNodes(boolean createParentNodes)
createParentNodes - true to create parent nodespublic TreeCache.Builder setSelector(TreeCacheSelector selector)
DefaultTreeCacheSelector is used. Change the selector here.selector - new selectorCopyright © 2011–2016 The Apache Software Foundation. All rights reserved.