@FunctionalInterface public interface ModeledCacheListener<T>
Modifier and Type | Interface and Description |
---|---|
static class |
ModeledCacheListener.Type |
Modifier and Type | Method and Description |
---|---|
void |
accept(ModeledCacheListener.Type type,
ZPath path,
org.apache.zookeeper.data.Stat stat,
T model)
The given path was added, updated or removed
|
default void |
handleException(Exception e)
Called when there is an exception processing a message from the internal cache.
|
default void |
initialized()
The cache has finished initializing
|
default ModeledCacheListener<T> |
postInitializedOnly()
Returns a version of this listener that only begins calling
accept(org.apache.curator.x.async.modeled.cached.ModeledCacheListener.Type, org.apache.curator.x.async.modeled.ZPath, org.apache.zookeeper.data.Stat, Object)
once initialized() has been called. |
void accept(ModeledCacheListener.Type type, ZPath path, org.apache.zookeeper.data.Stat stat, T model)
type
- action typepath
- the pathstat
- the node's stat (previous stat for removal)model
- the node's model (previous model for removal)default void initialized()
default void handleException(Exception e)
e
- the exceptiondefault ModeledCacheListener<T> postInitializedOnly()
accept(org.apache.curator.x.async.modeled.cached.ModeledCacheListener.Type, org.apache.curator.x.async.modeled.ZPath, org.apache.zookeeper.data.Stat, Object)
once initialized()
has been called. i.e. changes that occur as the cache is initializing are not sent
to the listenerCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.