Interface SynchronizerApi.RunGetInvoke

All Superinterfaces:
SynchronizerApi.Fluent, SynchronizerApi.Run.Invoke, SynchronizerApi.RunGet
Enclosing interface:
SynchronizerApi

public static interface SynchronizerApi.RunGetInvoke extends SynchronizerApi.RunGet, SynchronizerApi.Run.Invoke
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Invokes the action chain in a synchronized block.

    Methods inherited from interface com.github.mizool.core.concurrent.SynchronizerApi.RunGet

    get, run
  • Method Details

    • invoke

      default void invoke()
      Description copied from interface: SynchronizerApi.Run.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.
      Specified by:
      invoke in interface SynchronizerApi.Run.Invoke