@FunctionalInterface public interface CuratorCacheListener
CuratorCache events. The main functional interface is general purpose
but you can build event specific listeners, etc. using the builder. Note: all listeners
are wrapped in CuratorFramework.runSafe(Runnable) when called.| Modifier and Type | Interface and Description |
|---|---|
static class |
CuratorCacheListener.Type
An enumerated type that describes a change
|
| Modifier and Type | Method and Description |
|---|---|
static CuratorCacheListenerBuilder |
builder()
Returns a builder allowing type specific, and special purpose listeners.
|
void |
event(CuratorCacheListener.Type type,
ChildData oldData,
ChildData data)
Called when a data is created, changed or deleted.
|
default void |
initialized()
When the cache is started, the initial nodes are tracked and when they are finished loading
into the cache this method is called.
|
void event(CuratorCacheListener.Type type, ChildData oldData, ChildData data)
type - the type of eventoldData - the old data or nulldata - the new data or nulldefault void initialized()
static CuratorCacheListenerBuilder builder()
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.