@Retention(value=RUNTIME) @Target(value=TYPE) @Documented public @interface SynchronousPreferred
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
.
PostRepositoryHook
Modifier and Type | Optional Element and Description |
---|---|
boolean |
asyncSupported |
public abstract boolean asyncSupported
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.Copyright © 2024 Atlassian. All rights reserved.