T - The deserialized node value type.public class PersistentPathChildrenCache<T>
extends com.google.common.util.concurrent.AbstractIdleService
The view is persisted to disk as json and the node values must be valid json.
| Modifier and Type | Class and Description |
|---|---|
static interface |
PersistentPathChildrenCache.Listener |
| Constructor and Description |
|---|
PersistentPathChildrenCache(org.apache.curator.framework.CuratorFramework curator,
String path,
String clusterId,
Path snapshotFile,
com.fasterxml.jackson.databind.JavaType valueType) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(PersistentPathChildrenCache.Listener listener) |
Map<String,T> |
getNodes() |
void |
removeListener(PersistentPathChildrenCache.Listener listener) |
protected void |
shutDown() |
protected void |
startUp() |
public PersistentPathChildrenCache(org.apache.curator.framework.CuratorFramework curator,
String path,
String clusterId,
Path snapshotFile,
com.fasterxml.jackson.databind.JavaType valueType)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic void addListener(PersistentPathChildrenCache.Listener listener)
public void removeListener(PersistentPathChildrenCache.Listener listener)
protected void startUp()
throws Exception
startUp in class com.google.common.util.concurrent.AbstractIdleServiceExceptionprotected void shutDown()
throws Exception
shutDown in class com.google.common.util.concurrent.AbstractIdleServiceExceptionCopyright © 2017. All rights reserved.