public interface

PluginBulkContentCommandFactory

com.atlassian.bitbucket.scm.bulk.PluginBulkContentCommandFactory

Class Overview

A factory for creating commands which operate on bulk content. These are essentially variants of standard commands which have been optimized to work on large sets of data at once. The intention is to give SCM implementors an opportunity to leverage SCM-specific capabilities to gather data more efficiently than making repeated calls to standard commands.

Summary

Public Methods
@Nonnull Command<Void> commits(Repository repository, BulkCommitsCommandParameters parameters, BulkCommitCallback callback)
Streams commits from one or more repositories, providing a set of matching repositories for each.
@Nonnull Command<Void> contents(Repository repository, BulkContentCommandParameters parameters, BulkContentCallback callback)
@Nonnull Command<Void> traverseCommits(Repository repository, BulkTraverseCommitsCommandParameters parameters, BulkTraversalCallback callback)
Stream commits from one or more repositories, in topological order.

Public Methods

@Nonnull public Command<Void> commits (Repository repository, BulkCommitsCommandParameters parameters, BulkCommitCallback callback)

Streams commits from one or more repositories, providing a set of matching repositories for each.

Implementors: For performance reasons, it is expected that commits to be streamed will be identified using their full IDs. Implementations are not required to attempt to match short hashes. Where possible, implementations should not scale with the number of repositories from which commits are being requested. Not matching short IDs is intended to help facilitate such optimization.

Parameters
repository one of the repositories for which commits should be streamed
parameters parameters describing the commits to stream
callback a callback to receive the requested commits
Returns
  • a command which, when called, will stream commits to the provided callback

@Nonnull public Command<Void> contents (Repository repository, BulkContentCommandParameters parameters, BulkContentCallback callback)

Parameters
repository the repository to get contents from
parameters to specify where to get contents from
callback to process resulting content
Returns
  • the command

@Nonnull public Command<Void> traverseCommits (Repository repository, BulkTraverseCommitsCommandParameters parameters, BulkTraversalCallback callback)

Stream commits from one or more repositories, in topological order. Topological order means no parent is output before all of its descendants have been output. It does not require that descendants be streamed in date order, but SCMs may optionally do so (so long as topological order is retained).

Parameters
repository one of the repositories for which commits should be streamed
parameters parameters describing the commits to include in the traversal
callback a callback to receive the requested commits
Returns
  • a command which, when called, will stream commits, topologically ordered, to the provided callback