Interface PluginBulkContentCommandFactory


public interface PluginBulkContentCommandFactory
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.
Since:
4.2
  • Method Summary

    Modifier and Type
    Method
    Description
    com.atlassian.bitbucket.scm.Command<Void>
    commits(com.atlassian.bitbucket.repository.Repository repository, com.atlassian.bitbucket.scm.bulk.BulkCommitsCommandParameters parameters, com.atlassian.bitbucket.scm.bulk.BulkCommitCallback callback)
    Streams commits from one or more repositories, providing a set of matching repositories for each.
    com.atlassian.bitbucket.scm.Command<Void>
    contents(com.atlassian.bitbucket.repository.Repository repository, com.atlassian.bitbucket.scm.bulk.BulkContentCommandParameters parameters, com.atlassian.bitbucket.scm.bulk.BulkContentCallback callback)
     
    com.atlassian.bitbucket.scm.Command<Void>
    traverseCommits(com.atlassian.bitbucket.repository.Repository repository, com.atlassian.bitbucket.scm.bulk.BulkTraverseCommitsCommandParameters parameters, com.atlassian.bitbucket.scm.bulk.BulkTraversalCallback callback)
    Stream commits from one or more repositories, in topological order.
  • Method Details

    • commits

      @Nonnull com.atlassian.bitbucket.scm.Command<Void> commits(@Nonnull com.atlassian.bitbucket.repository.Repository repository, @Nonnull com.atlassian.bitbucket.scm.bulk.BulkCommitsCommandParameters parameters, @Nonnull com.atlassian.bitbucket.scm.bulk.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
      Since:
      5.8
    • contents

      @Nonnull com.atlassian.bitbucket.scm.Command<Void> contents(@Nonnull com.atlassian.bitbucket.repository.Repository repository, @Nonnull com.atlassian.bitbucket.scm.bulk.BulkContentCommandParameters parameters, @Nonnull com.atlassian.bitbucket.scm.bulk.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
    • traverseCommits

      @Nonnull com.atlassian.bitbucket.scm.Command<Void> traverseCommits(@Nonnull com.atlassian.bitbucket.repository.Repository repository, @Nonnull com.atlassian.bitbucket.scm.bulk.BulkTraverseCommitsCommandParameters parameters, @Nonnull com.atlassian.bitbucket.scm.bulk.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
      Since:
      5.11