本文整理汇总了Java中org.elasticsearch.common.xcontent.NamedXContentRegistry.EMPTY属性的典型用法代码示例。如果您正苦于以下问题:Java NamedXContentRegistry.EMPTY属性的具体用法?Java NamedXContentRegistry.EMPTY怎么用?Java NamedXContentRegistry.EMPTY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.elasticsearch.common.xcontent.NamedXContentRegistry
的用法示例。
在下文中一共展示了NamedXContentRegistry.EMPTY属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: azureRepository
private AzureRepository azureRepository(Settings settings) throws StorageException, IOException, URISyntaxException {
Settings internalSettings = Settings.builder()
.put(Environment.PATH_HOME_SETTING.getKey(), createTempDir().toAbsolutePath())
.putArray(Environment.PATH_DATA_SETTING.getKey(), tmpPaths())
.put(settings)
.build();
return new AzureRepository(new RepositoryMetaData("foo", "azure", internalSettings), new Environment(internalSettings),
NamedXContentRegistry.EMPTY, null);
}
示例2: FakeRestRequest
public FakeRestRequest() {
this(NamedXContentRegistry.EMPTY, new HashMap<>(), new HashMap<>(), null, Method.GET, "/", null);
}
示例3: ContentRestRequest
ContentRestRequest(String content, Map<String, String> params, Map<String, List<String>> headers) {
super(NamedXContentRegistry.EMPTY, params, "not used by this test", headers);
this.content = new BytesArray(content);
}
示例4: TestRestRequest
private TestRestRequest(String path, String content, XContentType xContentType) {
super(NamedXContentRegistry.EMPTY, Collections.emptyMap(), path, xContentType == null ?
Collections.emptyMap() : Collections.singletonMap("Content-Type", Collections.singletonList(xContentType.mediaType())));
this.content = new BytesArray(content);
}
示例5: assertValidBuffer
private void assertValidBuffer(long bufferMB, long chunkMB) throws IOException {
RepositoryMetaData metadata = new RepositoryMetaData("dummy-repo", "mock", Settings.builder()
.put(Repository.BUFFER_SIZE_SETTING.getKey(), new ByteSizeValue(bufferMB, ByteSizeUnit.MB))
.put(Repository.CHUNK_SIZE_SETTING.getKey(), new ByteSizeValue(chunkMB, ByteSizeUnit.MB)).build());
new S3Repository(metadata, Settings.EMPTY, NamedXContentRegistry.EMPTY, new DummyS3Service());
}