public abstract class AbstractCommitCallback extends Object implements CommitCallback
CommitCallback
that provides no-op implementations for all methods.Constructor and Description |
---|
AbstractCommitCallback() |
Modifier and Type | Method and Description |
---|---|
boolean |
onCommit(Commit commit)
Receives a fully-populated
commit for processing. |
void |
onEnd(CommitSummary summary)
Called after the final
commit has been streamed. |
void |
onStart(CommitContext context)
Called before the first
commit is streamed. |
public boolean onCommit(@Nonnull Commit commit) throws IOException
CommitCallback
commit
for processing.
This method will never be invoked before CommitCallback.onStart(CommitContext)
, and if it is invoked
CommitCallback.onEnd(CommitSummary)
is guaranteed to be invoked, whether the end happens because this
method returns false
or because the upstream sender runs out of commits.
onCommit
in interface CommitCallback
commit
- ignoredtrue
IOException
- may be thrown by derived classespublic void onEnd(@Nonnull CommitSummary summary) throws IOException
CommitCallback
commit
has been streamed.
Note: If there were no commits, this method may be called immediately after CommitCallback.onStart(CommitContext)
without any calls to CommitCallback.onCommit(Commit)
.
onEnd
in interface CommitCallback
summary
- ignoredIOException
- may be thrown by derived classespublic void onStart(@Nonnull CommitContext context) throws IOException
CommitCallback
commit
is streamed.onStart
in interface CommitCallback
context
- ignoredIOException
- may be thrown by derived classesCopyright © 2021 Atlassian. All rights reserved.