Class SignalMediator

java.lang.Object
no.digipost.concurrent.SignalMediator

public final class SignalMediator extends Object
A signal mediator is a many-to-one carrier of a simple "no-content" signal that one other part is interested in occurring. Any threads may provide as many signals to the mediator they like, the first occurring signal will enable one unblocking invocation of the signalWaiter.doWait(), and any more signaling will be silently discarded until the "consumption" of the signal is done. When a call to doWait() has completed, the mediator will accept a new signal again.
  • Field Details

    • signalWaiter

      public final Waiter signalWaiter
  • Constructor Details

    • SignalMediator

      public SignalMediator()
    • SignalMediator

      public SignalMediator(String name)
  • Method Details

    • signal

      public void signal()