Package com.atlassian.bitbucket.scm.bulk
Interface BulkCommitCallback
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Describes a callback for receiving a stream of 
commits, each with a set listing one or more
 repositories where it was found.- Since:
- 5.8
- 
Method SummaryModifier and TypeMethodDescriptionbooleanonCommit(Commit commit, Set<Repository> repositories) Receives a commit, and the set of repositories the commit was found in.default voidonEnd(BulkCommitSummary summary) Called after the finalcommithas been streamed.default voidonStart(BulkCommitContext context) Called before the firstcommitis streamed.
- 
Method Details- 
onCommitReceives a commit, and the set of repositories the commit was found in.Because the Commitmay be found in multiple repositories,Commit.getRepository()will always returnnullon the provided commit. To know which repository, or repositories, the commit was actually present in, use the accompanying set.This method will never be invoked before onStart(BulkCommitContext), and if it is invokedonEnd(BulkCommitSummary)is guaranteed to be invoked, whether the end happens because this method returnsfalseor because the upstream sender runs out of commits.- Parameters:
- commit- the commit
- repositories- a set containing one or more repositories where the commit was found
- Returns:
- trueif more commits should be provided; otherwise- falseto end streaming, potentially leaving some number of commits unread
- Throws:
- IOException- for implementations which perform I/O
 
- 
onEndCalled after the finalcommithas been streamed.Note: If there were no commits, this method may be called immediately after onStart(BulkCommitContext)without any calls toonCommit(Commit, Set).- Parameters:
- summary- summarizes the request and the streamed commits
- Throws:
- IOException- for implementations which perform I/O
 
- 
onStartCalled before the firstcommitis streamed.- Parameters:
- context- provides details about the request for which commits are being streamed
- Throws:
- IOException- for implementations which perform I/O
 
 
-