Options
All
  • Public
  • Public/Protected
  • All
Menu

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 {@link #traverseChildren(String)} returns true. When caching the list of nodes for a parent node, a given node is stored only if {@link #acceptChild(String)} returns true.

E.g. Given:

root
    n1-a
    n1-b
        n2-a
        n2-b
            n3-a
    n1-c
    n1-d
You 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").

Hierarchy

  • TreeCacheSelector

Implemented by

Index

Methods

acceptChild

  • acceptChild(fullPath: string): boolean
  • Return true if this node should be returned from the cache

    Parameters

    • fullPath: string

      full path of the ZNode

    Returns boolean

    true/false

traverseChildren

  • traverseChildren(fullPath: string): boolean
  • Return true if children of this path should be cached. i.e. if false is returned, this node is not queried to determine if it has children or not

    Parameters

    • fullPath: string

      full path of the ZNode

    Returns boolean

    true/false

Generated using TypeDoc