Interface FluentSynchronizerApi.VoidInvoke

All Superinterfaces:
FluentSynchronizerApi.Common, FluentSynchronizerApi.Void
Enclosing interface:
FluentSynchronizerApi

public static interface FluentSynchronizerApi.VoidInvoke extends FluentSynchronizerApi.Void
  • Method Details

    • invoke

      void invoke()
      Invokes the action chain in a synchronized block.

      All actions will be performed in order. This method blocks until all actions in the chain have been completed.

      While several action chains can be invoked concurrently on the same synchronizer, only one of them will perform an action at any given time. As this involves acquiring a lock shared with other action chains, care must be taken to avoid deadlocks, just as if using synchronized blocks and Object.wait() / Object.notifyAll() directly.

      Throws:
      UncheckedInterruptedException - if the thread was interrupted while waiting (i.e. performing a sleep action).