本文整理汇总了Java中org.elasticsearch.repositories.Repository.Factory方法的典型用法代码示例。如果您正苦于以下问题:Java Repository.Factory方法的具体用法?Java Repository.Factory怎么用?Java Repository.Factory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.elasticsearch.repositories.Repository
的用法示例。
在下文中一共展示了Repository.Factory方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRepositories
import org.elasticsearch.repositories.Repository; //导入方法依赖的package包/类
@Override
public Map<String, Repository.Factory> getRepositories(Environment env, NamedXContentRegistry namedXContentRegistry) {
return Collections.singletonMap(URLRepository.TYPE, metadata -> new URLRepository(metadata, env, namedXContentRegistry));
}
示例2: getRepositories
import org.elasticsearch.repositories.Repository; //导入方法依赖的package包/类
@Override
public Map<String, Repository.Factory> getRepositories(Environment env, NamedXContentRegistry namedXContentRegistry) {
return Collections.singletonMap("mock", (metadata) -> new MockRepository(metadata, env, namedXContentRegistry));
}
示例3: getRepositories
import org.elasticsearch.repositories.Repository; //导入方法依赖的package包/类
@Override
public Map<String, Repository.Factory> getRepositories(Environment env, NamedXContentRegistry namedXContentRegistry) {
return Collections.singletonMap(GoogleCloudStorageRepository.TYPE,
(metadata) -> new GoogleCloudStorageRepository(metadata, env, namedXContentRegistry, createStorageService(env)));
}
示例4: getRepositories
import org.elasticsearch.repositories.Repository; //导入方法依赖的package包/类
@Override
public Map<String, Repository.Factory> getRepositories(Environment env, NamedXContentRegistry namedXContentRegistry) {
return Collections.singletonMap(AzureRepository.TYPE,
(metadata) -> new AzureRepository(metadata, env, namedXContentRegistry, createStorageService(env.settings())));
}
示例5: getRepositories
import org.elasticsearch.repositories.Repository; //导入方法依赖的package包/类
@Override
public Map<String, Repository.Factory> getRepositories(Environment env, NamedXContentRegistry namedXContentRegistry) {
return Collections.singletonMap(S3Repository.TYPE,
(metadata) -> new S3Repository(metadata, env.settings(), namedXContentRegistry, createStorageService(env.settings())));
}
示例6: getRepositories
import org.elasticsearch.repositories.Repository; //导入方法依赖的package包/类
@Override
public Map<String, Repository.Factory> getRepositories(Environment env, NamedXContentRegistry namedXContentRegistry) {
return Collections.singletonMap("hdfs", (metadata) -> new HdfsRepository(metadata, env, namedXContentRegistry));
}
示例7: getRepositories
import org.elasticsearch.repositories.Repository; //导入方法依赖的package包/类
/**
* Returns repository types added by this plugin.
*
* @param env The environment for the local node, which may be used for the local settings and path.repo
*
* The key of the returned {@link Map} is the type name of the repository and
* the value is a factory to construct the {@link Repository} interface.
*/
default Map<String, Repository.Factory> getRepositories(Environment env, NamedXContentRegistry namedXContentRegistry) {
return Collections.emptyMap();
}