Interface MirrorSyncCallback
public interface MirrorSyncCallback
Describes a callback for receiving streaming
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.
- Since:
- 4.1
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonEnd(MirrorSyncSummary summary) Called after the finalref changehas been streamed.default booleanonFailedRef(MinimalRef ref) Called when a ref failed to synchronize.default booleanonRefChange(RefChange refChange) Provides aref changeto the callback for processing.default voidonStart(MirrorSyncContext context) Called before the firstref changeis streamed.
-
Method Details
-
onEnd
Called after the finalref changehas been streamed.Note: If there were no ref changes, this method may be called immediately after
onStart(MirrorSyncContext)without any calls toonRefChange(RefChange).- Parameters:
summary- summarizes the request and the streamed changes- Throws:
IOException- may be thrown by implementations which perform I/O
-
onFailedRef
Called when a ref failed to synchronize.If the callback is performing internal paging, it may signal the end of the page by returning
falsehere.- Parameters:
ref- the ref that failed- Returns:
trueif additional ref changes should be provided; otherwise,falseif the callback has received as many ref changes as desired- Throws:
IOException- may be thrown by implementations which perform I/O- Since:
- 4.2
-
onRefChange
Provides aref changeto the callback for processing.If the callback is performing internal paging, it may signal the end of the page by returning
falsehere.- Parameters:
refChange- the ref change to process- Returns:
trueif additional ref changes should be provided; otherwise,falseif the callback has received as many ref changes as desired- Throws:
IOException- may be thrown by implementations which perform I/O
-
onStart
Called before the firstref changeis streamed.- Parameters:
context- provides details about the request for which ref changes are being streamed- Throws:
IOException- may be thrown by implementations which perform I/O
-