com.atlassian.bitbucket.util.PagedCallback |
Marker interface augmenting a callback which produces a Page
of results during its processing.
Callbacks passed to SCM commands are primary candidates for implementing this interface. SCM implementations are then able to potentially optimise the output the command produces based on the page of data being requested.
Note: Implementing this interface does not mandate different handling from components that feed data into the callback; it encourages it, where possible. Paged callbacks still have to handle being provided results which are not on the requested page, either before or after, gracefully.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieves the
PageRequest which defines the Page the callback is attempting to build, allowing
components which provide data to the callback to potentially assist in producing the desired page. | |||||||||||
May be called by whatever component feeds information to the callback to indicate that the bounds of the
PageRequest have been applied already. |
Retrieves the PageRequest
which defines the Page
the callback is attempting to build, allowing
components which provide data to the callback to potentially assist in producing the desired page.
Page
the callback is attempting to build
May be called by whatever component feeds information to the callback to indicate that the bounds of the
PageRequest
have been applied already. In other words, if this method is invoked, it means the
producer was able to optimise the output based on the paging this callback would have done and will feed
it only data that is on the desired page.
Note: To allow the callback to determine whether there is another page, one more row than the requested page may be provided.