Annotation 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
-
Element Details
-
asyncSupported
boolean asyncSupported- Returns:
falseif the hook should only be called synchronously and should not be invoked at all for asynchronous hook requests. The default istrue, which ensures that the hook is called synchronously when possible, but asynchronously when it's not.
- Default:
- true
-