Class ObservationDispatcher

  • All Implemented Interfaces:
    Runnable

    public final class ObservationDispatcher
    extends Object
    implements Runnable
    Dispatcher for dispatching events to listeners within a single workspace.
    • Constructor Detail

      • ObservationDispatcher

        public ObservationDispatcher()
        Creates a new ObservationDispatcher instance and starts the notification thread daemon.
    • Method Detail

      • dispose

        public void dispose()
        Disposes this ObservationManager. This will effectively stop the background notification thread.
      • run

        public void run()
        Implements the run method of the background notification thread.
        Specified by:
        run in interface Runnable
      • delayIfEventQueueOverloaded

        public void delayIfEventQueueOverloaded()
        Checks if the observation event queue contains more than the configured maximum number of events, and delays the current thread in such cases. No delay is added if the current thread is the observation thread, for example if an observation listener writes to the repository.

        This method should only be called outside the scope of internal repository access locks.