Add javadocs to repository types registry methods
This commit is contained in:
parent
6f124e6eec
commit
4c5cfd02cc
|
@ -34,11 +34,16 @@ public class RepositoryTypesRegistry {
|
||||||
private final ExtensionPoint.TypeExtensionPoint<IndexShardRepository> shardRepositoryTypes =
|
private final ExtensionPoint.TypeExtensionPoint<IndexShardRepository> shardRepositoryTypes =
|
||||||
new ExtensionPoint.TypeExtensionPoint<>("index_repository", IndexShardRepository.class);
|
new ExtensionPoint.TypeExtensionPoint<>("index_repository", IndexShardRepository.class);
|
||||||
|
|
||||||
|
/** Adds a new repository type to the registry, bound to the given implementation classes. */
|
||||||
public void registerRepository(String name, Class<? extends Repository> repositoryType, Class<? extends IndexShardRepository> shardRepositoryType) {
|
public void registerRepository(String name, Class<? extends Repository> repositoryType, Class<? extends IndexShardRepository> shardRepositoryType) {
|
||||||
repositoryTypes.registerExtension(name, repositoryType);
|
repositoryTypes.registerExtension(name, repositoryType);
|
||||||
shardRepositoryTypes.registerExtension(name, shardRepositoryType);
|
shardRepositoryTypes.registerExtension(name, shardRepositoryType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Looks up the given type and binds the implementation into the given binder.
|
||||||
|
* Throws an {@link IllegalArgumentException} if the given type does not exist.
|
||||||
|
*/
|
||||||
public void bindType(Binder binder, String type) {
|
public void bindType(Binder binder, String type) {
|
||||||
Settings settings = Settings.builder().put("type", type).build();
|
Settings settings = Settings.builder().put("type", type).build();
|
||||||
repositoryTypes.bindType(binder, settings, "type", null);
|
repositoryTypes.bindType(binder, settings, "type", null);
|
||||||
|
|
Loading…
Reference in New Issue