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.
Listener for
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.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
An enumerated type that describes a change -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
When the cache is started, the initial nodes are tracked and when they are finished loading into the cache this method is called.
-
Method Details
-
event
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
Returns a builder allowing type specific, and special purpose listeners.- Returns:
- builder
-