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.

@FunctionalInterface public interface ConsistentHashChangeListener
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 Details

    • onConsistentHashChanged

      void onConsistentHashChanged(ConsistentHash newConsistentHash)
      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 the ConsistentHash.version() of the given newConsistentHash.
      Parameters:
      newConsistentHash - The new consistent hash
    • noOp

      Returns a No-op version of the functional interface ConsistentHashChangeListener.
      Returns:
      a no-op lambda taking a ConsistentHash as its only parameter.