Interface CuratorCacheListener
-
- 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 CuratorCacheListenerListener forCuratorCacheevents. The main functional interface is general purpose but you can build event specific listeners, etc. using the builder. Note: all listeners are wrapped inCuratorFramework.runSafe(Runnable)when called.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classCuratorCacheListener.TypeAn enumerated type that describes a change
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static CuratorCacheListenerBuilderbuilder()Returns a builder allowing type specific, and special purpose listeners.voidevent(CuratorCacheListener.Type type, ChildData oldData, ChildData data)Called when a data is created, changed or deleted.default voidinitialized()When the cache is started, the initial nodes are tracked and when they are finished loading into the cache this method is called.
-
-
-
Method Detail
-
event
void event(CuratorCacheListener.Type type, ChildData oldData, ChildData data)
Called when a data is created, changed or deleted.- Parameters:
type- the type of eventoldData- the old data or nulldata- the new data or null
-
initialized
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.
-
builder
static CuratorCacheListenerBuilder builder()
Returns a builder allowing type specific, and special purpose listeners.- Returns:
- builder
-
-