Class ListenerManager<T>

java.lang.Object
com.linkedin.venice.listener.ListenerManager<T>
Type Parameters:
T - T should be a type of listener

public class ListenerManager<T> extends Object
This class provides the unified way to manager venice listener.
  • Constructor Details

    • ListenerManager

      public ListenerManager()
  • Method Details

    • subscribe

      public void subscribe(String key, T listener)
    • unsubscribe

      public void unsubscribe(String key, T listener)
    • trigger

      public void trigger(String key, Consumer<T> handler)
      Trigger notification and execute the given handler.
      Parameters:
      key -
      handler - The function really handle the event. It accepts listener and call the corresponding handle method of this listener.