public interface MirrorSyncCallback
ref changes
.
Implementations of this callback performing internal paging may return false
from
onRefChange(RefChange)
to indicate no more ref changes are desired. Such implementations are
encouraged to also implement the PagedCallback
interface to
allow the system to optimise output handling, where possible, based on the page being requested.
Modifier and Type | Method and Description |
---|---|
default void |
onEnd(MirrorSyncSummary summary)
Called after the final
ref change has been streamed. |
default boolean |
onFailedRef(MinimalRef ref)
Called when a ref failed to synchronize.
|
default boolean |
onRefChange(RefChange refChange)
Provides a
ref change to the callback for processing. |
default void |
onStart(MirrorSyncContext context)
Called before the first
ref change is streamed. |
default void onEnd(@Nonnull MirrorSyncSummary summary) throws IOException
ref change
has been streamed.
Note: If there were no ref changes, this method may be called immediately after onStart(MirrorSyncContext)
without any calls to onRefChange(RefChange)
.
summary
- summarizes the request and the streamed changesIOException
- may be thrown by implementations which perform I/Odefault boolean onFailedRef(@Nonnull MinimalRef ref) throws IOException
If the callback is performing internal paging, it may signal the end of the page by returning false
here.
ref
- the ref that failedtrue
if additional ref changes should be provided; otherwise, false
if the callback has
received as many ref changes as desiredIOException
- may be thrown by implementations which perform I/Odefault boolean onRefChange(@Nonnull RefChange refChange) throws IOException
ref change
to the callback for processing.
If the callback is performing internal paging, it may signal the end of the page by returning false
here.
refChange
- the ref change to processtrue
if additional ref changes should be provided; otherwise, false
if the callback has
received as many ref changes as desiredIOException
- may be thrown by implementations which perform I/Odefault void onStart(@Nonnull MirrorSyncContext context) throws IOException
ref change
is streamed.context
- provides details about the request for which ref changes are being streamedIOException
- may be thrown by implementations which perform I/OCopyright © 2021 Atlassian. All rights reserved.