Annotation Interface SynchronousPreferred


@Retention(RUNTIME) @Target(TYPE) @Documented public @interface SynchronousPreferred
Annotation to be used with PostRepositoryHook instances to signal that the hook prefers to be called synchronously, which allows the hook to write to the SCM client error and output streams directly for pushes to the repository.

Note that annotating a PostRepositoryHook with @SynchronousPreferred does not guarantee that the hook will be called synchronously. For many triggers hooks will only be invoked asynchronously.

If the hook should only be called synchronously, and should be skipped for asynchronous hook requests, set asyncSupported() to false.

Since:
5.0
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
     
  • Element Details

    • asyncSupported

      boolean asyncSupported
      Returns:
      false if the hook should only be called synchronously and should not be invoked at all for asynchronous hook requests. The default is true, which ensures that the hook is called synchronously when possible, but asynchronously when it's not.
      Default:
      true