mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-07-06 12:18:34 +02:00
Document parameter
This commit is contained in:
@@ -301,7 +301,10 @@ public final class BrowseCommandBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Limit the number of result files to <code>limit</code> entries.
|
||||
* Limit the number of result files to <code>limit</code> entries. By default this is set to
|
||||
* {@value BrowseCommandRequest#DEFAULT_REQUEST_LIMIT}. Be aware that this parameter can have
|
||||
* severe performance implications. Reading a repository with thousands of files in one folder
|
||||
* can generate a huge load for a longer time.
|
||||
*
|
||||
* @param limit The maximal number of files this request shall return.
|
||||
*
|
||||
|
||||
@@ -49,7 +49,8 @@ import java.util.function.Consumer;
|
||||
public final class BrowseCommandRequest extends FileBaseCommandRequest
|
||||
{
|
||||
|
||||
/** Field description */
|
||||
public static final int DEFAULT_REQUEST_LIMIT = 1000;
|
||||
|
||||
private static final long serialVersionUID = 7956624623516803183L;
|
||||
|
||||
public BrowseCommandRequest() {
|
||||
@@ -271,7 +272,7 @@ public final class BrowseCommandRequest extends FileBaseCommandRequest
|
||||
|
||||
|
||||
/** Limit the number of result files to <code>limit</code> entries. */
|
||||
private int limit = 1000;
|
||||
private int limit = DEFAULT_REQUEST_LIMIT;
|
||||
|
||||
// WARNING / TODO: This field creates a reverse channel from the implementation to the API. This will break
|
||||
// whenever the API runs in a different process than the SPI (for example to run explicit hosts for git repositories).
|
||||
|
||||
Reference in New Issue
Block a user