Module lettuce.core

Class DefaultEventBus

java.lang.Object
io.lettuce.core.event.DefaultEventBus
All Implemented Interfaces:
EventBus

public class DefaultEventBus
extends Object
implements EventBus
Default implementation for an EventBus. Events are published using a Scheduler and events are recorded through EventRecorder.
Since:
3.4
Author:
Mark Paluch
  • Constructor Details

    • DefaultEventBus

      public DefaultEventBus​(Scheduler scheduler)
  • Method Details

    • get

      public Flux<Event> get()
      Description copied from interface: EventBus
      Subscribe to the event bus and Events. The Flux drops events on backpressure to avoid contention.
      Specified by:
      get in interface EventBus
      Returns:
      the observable to obtain events.
    • publish

      public void publish​(Event event)
      Description copied from interface: EventBus
      Publish a Event to the bus.
      Specified by:
      publish in interface EventBus
      Parameters:
      event - the event to publish