Interface ModeledCacheListener<T>
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ModeledCacheListener<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classModeledCacheListener.Type
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaccept(ModeledCacheListener.Type type, ZPath path, org.apache.zookeeper.data.Stat stat, T model)The given path was added, updated or removeddefault voidhandleException(java.lang.Exception e)Called when there is an exception processing a message from the internal cache.default voidinitialized()The cache has finished initializingdefault ModeledCacheListener<T>postInitializedOnly()Returns a version of this listener that only begins callingaccept(org.apache.curator.x.async.modeled.cached.ModeledCacheListener.Type, org.apache.curator.x.async.modeled.ZPath, org.apache.zookeeper.data.Stat, Object)onceinitialized()has been called.
-
-
-
Method Detail
-
accept
void accept(ModeledCacheListener.Type type, ZPath path, org.apache.zookeeper.data.Stat stat, T model)
The given path was added, updated or removed- Parameters:
type- action typepath- the pathstat- the node's stat (previous stat for removal)model- the node's model (previous model for removal)
-
initialized
default void initialized()
The cache has finished initializing
-
handleException
default void handleException(java.lang.Exception e)
Called when there is an exception processing a message from the internal cache. This is most likely due to a de-serialization problem.- Parameters:
e- the exception
-
postInitializedOnly
default ModeledCacheListener<T> postInitializedOnly()
Returns a version of this listener that only begins callingaccept(org.apache.curator.x.async.modeled.cached.ModeledCacheListener.Type, org.apache.curator.x.async.modeled.ZPath, org.apache.zookeeper.data.Stat, Object)onceinitialized()has been called. i.e. changes that occur as the cache is initializing are not sent to the listener- Returns:
- wrapped listener
-
-