Package com.atlassian.bitbucket.commit
Interface LastModifiedCallback
- 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 the commits that last modified a set of files.
- Since:
- 4.6
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonEnd(LastModifiedSummary summary) Called after the finalfile's last modification has been streamed.booleanReceives a fully-populatedcommitwhich last modified the specifiedfile.default voidonStart(LastModifiedContext context) Called before the firstfileis streamed.
-
Method Details
-
onEnd
Called after the finalfile's last modification has been streamed.Note: If the
requested pathcontained no files, this method may be called immediately afteronStart(LastModifiedContext)without any calls toonFile(String, Commit).- Parameters:
summary- summarizes the request and provides the most recent commit to modify the requested path- Throws:
IOException- for implementations which perform I/O
-
onFile
Receives a fully-populatedcommitwhich last modified the specifiedfile. Files are provided as relative to therequested path, and only files are provided. Subdirectories of the requested path are not streamed.This method will never be invoked before
onStart(LastModifiedContext), and if it is invokedonEnd(LastModifiedSummary)is guaranteed to be invoked, whether the end happens because this method returnsfalseor because the upstream sender runs out of modifications.- Parameters:
file- a relative path to the modified filecommit- the last commit to modify the file- Returns:
trueif more modifications should be provided; otherwise,falseto end streaming, potentially leaving some number of modifications unread- Throws:
IOException- for implementations which perform I/O
-
onStart
Called before the firstfileis streamed.- Parameters:
context- provides details about the request- Throws:
IOException- for implementations which perform I/O
-