Skip to content

Commit 97a0d5f

Browse files
committed
javadoc
1 parent ab51a4e commit 97a0d5f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

server/src/main/java/org/elasticsearch/repositories/Repository.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,22 @@ interface Factory {
5959
/**
6060
* Constructs a repository.
6161
*
62-
* @param projectId
62+
* @param projectId the project-id for the repository. {@code null} if the repository is at the cluster level.
6363
* @param metadata metadata for the repository including name and settings
6464
*/
65-
Repository create(ProjectId projectId, RepositoryMetadata metadata) throws Exception;
65+
Repository create(@Nullable ProjectId projectId, RepositoryMetadata metadata) throws Exception;
6666

6767
/**
6868
* Constructs a repository.
69-
* @param projectId the project-id for the repository
69+
* @param projectId the project-id for the repository. {@code null} if the repository is at the cluster level.
7070
* @param metadata metadata for the repository including name and settings
7171
* @param typeLookup a function that returns the repository factory for the given repository type.
7272
*/
73-
default Repository create(ProjectId projectId, RepositoryMetadata metadata, Function<String, Repository.Factory> typeLookup)
74-
throws Exception {
73+
default Repository create(
74+
@Nullable ProjectId projectId,
75+
RepositoryMetadata metadata,
76+
Function<String, Repository.Factory> typeLookup
77+
) throws Exception {
7578
return create(projectId, metadata);
7679
}
7780
}

0 commit comments

Comments
 (0)