Document parameter

This commit is contained in:
Rene Pfeuffer
2020-02-18 08:08:09 +01:00
parent db540f5f02
commit 8a1a43fcc5
2 changed files with 7 additions and 3 deletions

View File

@@ -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.
*

View File

@@ -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).