Interface ConsistentHashChangeListener
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents a listener that is notified when a ConsistentHash instance of the component it is registered with has
changed.
- Since:
- 3.2
- Author:
- Allard Buijze
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConsistentHashChangeListenernoOp()Returns a No-op version of the functional interfaceConsistentHashChangeListener.voidonConsistentHashChanged(ConsistentHash newConsistentHash) Notification that a consistent hash has changed.
-
Method Details
-
onConsistentHashChanged
Notification that a consistent hash has changed. Implementations should take into account that this listener may be called concurrently, and that multiple invocations do not necessarily reflect the order in which changes have occurred. If this is order important to the implementation, it should verify theConsistentHash.version()of the givennewConsistentHash.- Parameters:
newConsistentHash- The new consistent hash
-
noOp
Returns a No-op version of the functional interfaceConsistentHashChangeListener.- Returns:
- a no-op lambda taking a
ConsistentHashas its only parameter.
-