@Deprecated public interface

Scm4

implements Scm2
com.atlassian.stash.scm.Scm4

This interface is deprecated.
in 3.9 for removal in 4.0. In 4.0 this interface's methods will be folded into Scm and become a mandatory part of the SCM contract.

Class Overview

Adds functionality for calculating repository size to the Scm interface.

This is a transitional interface to retain API compatibility for Scm. getSize(Repository) will be folded into Scm in the 4.0 major release.

Summary

Public Methods
long getSize(Repository repository)
Calculates the size of the specified repository in bytes.
[Expand]
Inherited Methods
From interface com.atlassian.stash.scm.Scm
From interface com.atlassian.stash.scm.Scm2

Public Methods

public long getSize (Repository repository)

Calculates the size of the specified repository in bytes.

If the provided Repository does not exist, implementors should return 0 rather than throwing an exception. Beyond that, SCM implementors are free to calculate size as they see fit. The SCM contract does not require implementors to calculate an exact size. Some SCMs may store their files such that there is a very fast way to approximate the repository's size while calculating an exact size would be extremely expensive. For such SCMs, implementors are strongly encouraged to use an approximation.

Parameters
repository the repository whose size should be calculated
Returns
  • the size of the specified repository in bytes