Interface EventCoordinator

All Known Implementing Classes:
JpaPollingEventCoordinator

@Internal public interface EventCoordinator
Coordinates appended events notifications for event storage engines.

Implementations can notify only within the current process, or coordinate between multiple instances using mechanisms such as polling, messaging, or database notifications.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Represents a handle to a coordination instance, allowing the engine to notify of new events and to terminate the coordination.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final EventCoordinator
    A coordinator that only forwards append notifications within a single event storage engine.
  • Method Summary

    Modifier and Type
    Method
    Description
    startCoordination(Runnable onAppendDetected)
    Starts a coordination instance that will invoke the given callback when new events are appended.
  • Field Details

    • SIMPLE

      static final EventCoordinator SIMPLE
      A coordinator that only forwards append notifications within a single event storage engine. It does not coordinate between multiple instances.
  • Method Details

    • startCoordination

      EventCoordinator.Handle startCoordination(Runnable onAppendDetected)
      Starts a coordination instance that will invoke the given callback when new events are appended.

      The callback may be invoked on an arbitrary thread. Implementations should ensure the callback does not perform long-running or blocking operations. If the callback throws an exception, the coordination is terminated.

      Parameters:
      onAppendDetected - the callback to invoke when new events are detected; must not be null
      Returns:
      a handle to interact with the coordination instance, including notifying of new events and terminating the coordination; never null