# Class NodesCache

java.lang.Object
org.apache.zookeeper.inspector.manager.NodesCache

public class NodesCache extends Object
A local cache of ZNodes in front of the Zookeeper server(s) to help cut down on network calls. This class will return results from the cache first, if available, and then fetch results remotely from Zookeeper if not.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`CACHE_SIZE`
`static final int`
`ENTRY_EXPIRATION_TIME_MILLIS`

## Constructor Summary

Constructors
Constructor
Description
`NodesCache(ZooKeeper zooKeeper)`

## Method Summary

Modifier and Type
Method
Description
`List<String>`
`getChildren(String nodePath)`
Fetch the children of the given node from the cache.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### CACHE_SIZE

public static final int CACHE_SIZE

See Also:
  - Constant Field Values

### ENTRY_EXPIRATION_TIME_MILLIS

public static final int ENTRY_EXPIRATION_TIME_MILLIS

See Also:
  - Constant Field Values

## Constructor Details

### NodesCache

public NodesCache(ZooKeeper zooKeeper)

## Method Details

### getChildren

public List<String> getChildren(String nodePath)
Fetch the children of the given node from the cache.

Parameters:
  `nodePath` - The full path to the parent whose children are to be fetched.
Returns:
  The list of children of the given node as a list of full ZNode path strings or null if an error occurred.