Skip to content

Commit d4e3fce

Browse files
committed
HSEARCH-5464 Finish with renaming and JQAssistant
1 parent 8a4937a commit d4e3fce

File tree

21 files changed

+120
-114
lines changed

21 files changed

+120
-114
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
*
1515
* @author Gunnar Morling
1616
*/
17-
public final class ClientRestElasticsearchBackendClientSettings {
17+
public final class ClientRest4ElasticsearchBackendClientSettings {
1818

19-
private ClientRestElasticsearchBackendClientSettings() {
19+
private ClientRest4ElasticsearchBackendClientSettings() {
2020
}
2121

2222
/**
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/**
1010
* Configuration properties for the Elasticsearch backend that are considered SPI (and not API).
1111
*/
12-
public final class ClientRestElasticsearchBackendClientSpiSettings {
12+
public final class ClientRest4ElasticsearchBackendClientSpiSettings {
1313

1414
/**
1515
* The prefix expected for the key of every Hibernate Search configuration property.
@@ -35,7 +35,7 @@ public final class ClientRestElasticsearchBackendClientSpiSettings {
3535
*/
3636
public static final String CLIENT_INSTANCE = "client.instance";
3737

38-
private ClientRestElasticsearchBackendClientSpiSettings() {
38+
private ClientRest4ElasticsearchBackendClientSpiSettings() {
3939
}
4040

4141
/**
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Configuration properties for the Elasticsearch backend that are considered SPI (and not API).
1212
*/
1313
@Incubating
14-
public final class ClientJavaElasticsearchBackendClientSpiSettings {
14+
public final class ClientRest5ElasticsearchBackendClientSpiSettings {
1515

1616
/**
1717
* The prefix expected for the key of every Hibernate Search configuration property.
@@ -37,7 +37,7 @@ public final class ClientJavaElasticsearchBackendClientSpiSettings {
3737
*/
3838
public static final String CLIENT_INSTANCE = "client.instance";
3939

40-
private ClientJavaElasticsearchBackendClientSpiSettings() {
40+
private ClientRest5ElasticsearchBackendClientSpiSettings() {
4141
}
4242

4343
/**
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
import org.apache.hc.core5.http.impl.EnglishReasonPhraseCatalog;
4848
import org.apache.hc.core5.util.Timeout;
4949

50-
public class ClientJavaElasticsearchClient implements ElasticsearchClientImplementor {
50+
public class ClientRest5ElasticsearchClient implements ElasticsearchClientImplementor {
5151

5252
private final BeanHolder<? extends Rest5Client> restClientHolder;
5353

@@ -60,7 +60,7 @@ public class ClientJavaElasticsearchClient implements ElasticsearchClientImpleme
6060
private final Gson gson;
6161
private final JsonLogHelper jsonLogHelper;
6262

63-
ClientJavaElasticsearchClient(BeanHolder<? extends Rest5Client> restClientHolder, Sniffer sniffer,
63+
ClientRest5ElasticsearchClient(BeanHolder<? extends Rest5Client> restClientHolder, Sniffer sniffer,
6464
SimpleScheduledExecutor timeoutExecutorService,
6565
Optional<Integer> requestTimeoutMs,
6666
Gson gson, JsonLogHelper jsonLogHelper) {
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
import org.hibernate.search.engine.environment.bean.spi.BeanConfigurationContext;
1010
import org.hibernate.search.engine.environment.bean.spi.BeanConfigurer;
1111

12-
public class ClientJavaElasticsearchClientBeanConfigurer implements BeanConfigurer {
12+
public class ClientRest5ElasticsearchClientBeanConfigurer implements BeanConfigurer {
1313
@Override
1414
public void configure(BeanConfigurationContext context) {
1515
context.define(
16-
ElasticsearchClientFactory.class, "elasticsearch-java",
17-
beanResolver -> BeanHolder.of( new ClientJavaElasticsearchClientFactory() )
16+
ElasticsearchClientFactory.class, "elasticsearch-rest5",
17+
beanResolver -> BeanHolder.of( new ClientRest5ElasticsearchClientFactory() )
1818
);
1919
}
2020
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import org.hibernate.search.backend.elasticsearch.client.common.spi.ElasticsearchRequestInterceptorProvider;
1818
import org.hibernate.search.backend.elasticsearch.client.rest5.ElasticsearchHttpClientConfigurer;
1919
import org.hibernate.search.backend.elasticsearch.client.rest5.cfg.ClientJavaElasticsearchBackendClientSettings;
20-
import org.hibernate.search.backend.elasticsearch.client.rest5.cfg.spi.ClientJavaElasticsearchBackendClientSpiSettings;
20+
import org.hibernate.search.backend.elasticsearch.client.rest5.cfg.spi.ClientRest5ElasticsearchBackendClientSpiSettings;
2121
import org.hibernate.search.backend.elasticsearch.logging.spi.ConfigurationLog;
2222
import org.hibernate.search.engine.cfg.ConfigurationPropertySource;
2323
import org.hibernate.search.engine.cfg.spi.ConfigurationProperty;
@@ -53,10 +53,10 @@
5353
/**
5454
* @author Gunnar Morling
5555
*/
56-
public class ClientJavaElasticsearchClientFactory implements ElasticsearchClientFactory {
56+
public class ClientRest5ElasticsearchClientFactory implements ElasticsearchClientFactory {
5757

5858
private static final OptionalConfigurationProperty<BeanReference<? extends Rest5Client>> CLIENT_INSTANCE =
59-
ConfigurationProperty.forKey( ClientJavaElasticsearchBackendClientSpiSettings.CLIENT_INSTANCE )
59+
ConfigurationProperty.forKey( ClientRest5ElasticsearchBackendClientSpiSettings.CLIENT_INSTANCE )
6060
.asBeanReference( Rest5Client.class )
6161
.build();
6262

@@ -167,7 +167,7 @@ public ElasticsearchClientImplementor create(BeanResolver beanResolver, Configur
167167
sniffer = createSniffer( propertySource, restClientHolder.get(), hosts );
168168
}
169169

170-
return new ClientJavaElasticsearchClient(
170+
return new ClientRest5ElasticsearchClient(
171171
restClientHolder, sniffer, timeoutExecutorService,
172172
requestTimeoutMs,
173173
gsonProvider.getGson(), gsonProvider.getLogHelper()
@@ -308,8 +308,8 @@ private HttpAsyncClientBuilder customizeHttpClientConfig(HttpAsyncClientBuilder
308308
builder.setKeepAliveStrategy( new CustomConnectionKeepAliveStrategy( maxKeepAlive.get() ) );
309309
}
310310

311-
ClientJavaElasticsearchHttpClientConfigurationContext clientConfigurationContext =
312-
new ClientJavaElasticsearchHttpClientConfigurationContext( beanResolver, propertySource, builder );
311+
ClientRest5ElasticsearchHttpClientConfigurationContext clientConfigurationContext =
312+
new ClientRest5ElasticsearchHttpClientConfigurationContext( beanResolver, propertySource, builder );
313313

314314
for ( ElasticsearchHttpClientConfigurer configurer : configurers ) {
315315
configurer.configure( clientConfigurationContext );
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
import org.apache.hc.client5.http.impl.async.HttpAsyncClientBuilder;
1313

14-
final class ClientJavaElasticsearchHttpClientConfigurationContext
14+
final class ClientRest5ElasticsearchHttpClientConfigurationContext
1515
implements ElasticsearchHttpClientConfigurationContext, ElasticsearchRequestInterceptorProviderContext {
1616
private final BeanResolver beanResolver;
1717
private final ConfigurationPropertySource configurationPropertySource;
1818
private final HttpAsyncClientBuilder clientBuilder;
1919

20-
ClientJavaElasticsearchHttpClientConfigurationContext(
20+
ClientRest5ElasticsearchHttpClientConfigurationContext(
2121
BeanResolver beanResolver,
2222
ConfigurationPropertySource configurationPropertySource,
2323
HttpAsyncClientBuilder clientBuilder) {
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
org.hibernate.search.backend.elasticsearch.client.rest5.impl.ClientJavaElasticsearchClientBeanConfigurer
1+
org.hibernate.search.backend.elasticsearch.client.rest5.impl.ClientRest5ElasticsearchClientBeanConfigurer

backend/elasticsearch-client/opensearch-rest-client/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
<artifactId>hibernate-search-backend-elasticsearch-client-opensearch-rest</artifactId>
1616

1717
<name>Hibernate Search Backend - Elasticsearch client based on the low-level OpenSearch client</name>
18-
<description>Hibernate Search Elasticsearch client based on the low-level OpenSearch client</description>
18+
<description>Hibernate Search Elasticsearch client based on the low-level OpenSearch client (Apache HTTP Client 5 based one)</description>
1919

2020
<properties>
2121
<!-- This is a publicly distributed module that should be published: -->
2222
<deploy.skip>false</deploy.skip>
23-
<java.module.name>org.hibernate.search.backend.elasticsearch.client.opensearch</java.module.name>
23+
<java.module.name>org.hibernate.search.backend.elasticsearch.client.opensearch.rest</java.module.name>
2424
</properties>
2525

2626
<dependencies>

backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/cfg/ElasticsearchBackendSettings.java

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import java.util.List;
99

1010
import org.hibernate.search.backend.elasticsearch.ElasticsearchVersion;
11+
import org.hibernate.search.backend.elasticsearch.client.rest4.cfg.ClientRest4ElasticsearchBackendClientSettings;
1112
import org.hibernate.search.backend.elasticsearch.index.layout.IndexLayoutStrategy;
1213
import org.hibernate.search.backend.elasticsearch.index.layout.impl.SimpleIndexLayoutStrategy;
1314
import org.hibernate.search.backend.elasticsearch.mapping.TypeNameMappingStrategyName;
@@ -139,7 +140,7 @@ private ElasticsearchBackendSettings() {
139140
* <p>
140141
* Defaults to no request timeout.
141142
*
142-
* @deprecated Use {@link org.hibernate.search.backend.elasticsearch.client.rest4.cfg.ClientRestElasticsearchBackendClientSettings#REQUEST_TIMEOUT} instead.
143+
* @deprecated Use {@link ClientRest4ElasticsearchBackendClientSettings#REQUEST_TIMEOUT} instead.
143144
* The setting itself is not deprecated, it just moved to the client-specific configuration.
144145
*/
145146
@Deprecated(since = "8.2", forRemoval = true)
@@ -153,7 +154,7 @@ private ElasticsearchBackendSettings() {
153154
* <p>
154155
* Defaults to {@link Defaults#READ_TIMEOUT}.
155156
*
156-
* @deprecated Use {@link org.hibernate.search.backend.elasticsearch.client.rest4.cfg.ClientRestElasticsearchBackendClientSettings#READ_TIMEOUT} instead.
157+
* @deprecated Use {@link ClientRest4ElasticsearchBackendClientSettings#READ_TIMEOUT} instead.
157158
* The setting itself is not deprecated, it just moved to the client-specific configuration.
158159
*/
159160
@Deprecated(since = "8.2", forRemoval = true)
@@ -167,7 +168,7 @@ private ElasticsearchBackendSettings() {
167168
* <p>
168169
* Defaults to {@link Defaults#CONNECTION_TIMEOUT}.
169170
*
170-
* @deprecated Use {@link org.hibernate.search.backend.elasticsearch.client.rest4.cfg.ClientRestElasticsearchBackendClientSettings#CONNECTION_TIMEOUT} instead.
171+
* @deprecated Use {@link ClientRest4ElasticsearchBackendClientSettings#CONNECTION_TIMEOUT} instead.
171172
* The setting itself is not deprecated, it just moved to the client-specific configuration.
172173
*/
173174
@Deprecated(since = "8.2", forRemoval = true)
@@ -182,7 +183,7 @@ private ElasticsearchBackendSettings() {
182183
* <p>
183184
* Defaults to {@link Defaults#MAX_CONNECTIONS}.
184185
*
185-
* @deprecated Use {@link org.hibernate.search.backend.elasticsearch.client.rest4.cfg.ClientRestElasticsearchBackendClientSettings#MAX_CONNECTIONS} instead.
186+
* @deprecated Use {@link ClientRest4ElasticsearchBackendClientSettings#MAX_CONNECTIONS} instead.
186187
* The setting itself is not deprecated, it just moved to the client-specific configuration.
187188
*/
188189
@Deprecated(since = "8.2", forRemoval = true)
@@ -196,7 +197,7 @@ private ElasticsearchBackendSettings() {
196197
* <p>
197198
* Defaults to {@link Defaults#MAX_CONNECTIONS_PER_ROUTE}.
198199
*
199-
* @deprecated Use {@link org.hibernate.search.backend.elasticsearch.client.rest4.cfg.ClientRestElasticsearchBackendClientSettings#MAX_CONNECTIONS_PER_ROUTE} instead.
200+
* @deprecated Use {@link ClientRest4ElasticsearchBackendClientSettings#MAX_CONNECTIONS_PER_ROUTE} instead.
200201
* The setting itself is not deprecated, it just moved to the client-specific configuration.
201202
*/
202203
@Deprecated(since = "8.2", forRemoval = true)
@@ -210,7 +211,7 @@ private ElasticsearchBackendSettings() {
210211
* <p>
211212
* Defaults to {@link Defaults#DISCOVERY_ENABLED}.
212213
*
213-
* @deprecated Use {@link org.hibernate.search.backend.elasticsearch.client.rest4.cfg.ClientRestElasticsearchBackendClientSettings#DISCOVERY_ENABLED} instead.
214+
* @deprecated Use {@link ClientRest4ElasticsearchBackendClientSettings#DISCOVERY_ENABLED} instead.
214215
* The setting itself is not deprecated, it just moved to the client-specific configuration.
215216
*/
216217
@Deprecated(since = "8.2", forRemoval = true)
@@ -224,7 +225,7 @@ private ElasticsearchBackendSettings() {
224225
* <p>
225226
* Defaults to {@link Defaults#DISCOVERY_REFRESH_INTERVAL}.
226227
*
227-
* @deprecated Use {@link org.hibernate.search.backend.elasticsearch.client.rest4.cfg.ClientRestElasticsearchBackendClientSettings#DISCOVERY_REFRESH_INTERVAL} instead.
228+
* @deprecated Use {@link ClientRest4ElasticsearchBackendClientSettings#DISCOVERY_REFRESH_INTERVAL} instead.
228229
* The setting itself is not deprecated, it just moved to the client-specific configuration.
229230
*/
230231
@Deprecated(since = "8.2", forRemoval = true)
@@ -330,7 +331,7 @@ private ElasticsearchBackendSettings() {
330331
* If this property is not set, only the {@code Keep-Alive} header is considered,
331332
* and if it's absent, idle connections will be kept forever.
332333
*
333-
* @deprecated Use {@link org.hibernate.search.backend.elasticsearch.client.rest4.cfg.ClientRestElasticsearchBackendClientSettings#MAX_KEEP_ALIVE} instead.
334+
* @deprecated Use {@link ClientRest4ElasticsearchBackendClientSettings#MAX_KEEP_ALIVE} instead.
334335
* The setting itself is not deprecated, it just moved to the client-specific configuration.
335336
*/
336337
@Deprecated(since = "8.2", forRemoval = true)
@@ -365,37 +366,37 @@ private Defaults() {
365366
public static final String PROTOCOL = "http";
366367
public static final String PATH_PREFIX = "";
367368
/**
368-
* @deprecated Use {@link org.hibernate.search.backend.elasticsearch.client.rest4.cfg.ClientRestElasticsearchBackendClientSettings.Defaults#READ_TIMEOUT} instead.
369+
* @deprecated Use {@link ClientRest4ElasticsearchBackendClientSettings.Defaults#READ_TIMEOUT} instead.
369370
* The default value itself is not deprecated, just the constant defining it moved to a different, client-specific class.
370371
*/
371372
@Deprecated(since = "8.2", forRemoval = true)
372373
public static final int READ_TIMEOUT = 30000;
373374
/**
374-
* @deprecated Use {@link org.hibernate.search.backend.elasticsearch.client.rest4.cfg.ClientRestElasticsearchBackendClientSettings.Defaults#CONNECTION_TIMEOUT} instead.
375+
* @deprecated Use {@link ClientRest4ElasticsearchBackendClientSettings.Defaults#CONNECTION_TIMEOUT} instead.
375376
* The default value itself is not deprecated, just the constant defining it moved to a different, client-specific class.
376377
*/
377378
@Deprecated(since = "8.2", forRemoval = true)
378379
public static final int CONNECTION_TIMEOUT = 1000;
379380
/**
380-
* @deprecated Use {@link org.hibernate.search.backend.elasticsearch.client.rest4.cfg.ClientRestElasticsearchBackendClientSettings.Defaults#MAX_CONNECTIONS} instead.
381+
* @deprecated Use {@link ClientRest4ElasticsearchBackendClientSettings.Defaults#MAX_CONNECTIONS} instead.
381382
* The default value itself is not deprecated, just the constant defining it moved to a different, client-specific class.
382383
*/
383384
@Deprecated(since = "8.2", forRemoval = true)
384385
public static final int MAX_CONNECTIONS = 40;
385386
/**
386-
* @deprecated Use {@link org.hibernate.search.backend.elasticsearch.client.rest4.cfg.ClientRestElasticsearchBackendClientSettings.Defaults#MAX_CONNECTIONS_PER_ROUTE} instead.
387+
* @deprecated Use {@link ClientRest4ElasticsearchBackendClientSettings.Defaults#MAX_CONNECTIONS_PER_ROUTE} instead.
387388
* The default value itself is not deprecated, just the constant defining it moved to a different, client-specific class.
388389
*/
389390
@Deprecated(since = "8.2", forRemoval = true)
390391
public static final int MAX_CONNECTIONS_PER_ROUTE = 20;
391392
/**
392-
* @deprecated Use {@link org.hibernate.search.backend.elasticsearch.client.rest4.cfg.ClientRestElasticsearchBackendClientSettings.Defaults#DISCOVERY_ENABLED} instead.
393+
* @deprecated Use {@link ClientRest4ElasticsearchBackendClientSettings.Defaults#DISCOVERY_ENABLED} instead.
393394
* The default value itself is not deprecated, just the constant defining it moved to a different, client-specific class.
394395
*/
395396
@Deprecated(since = "8.2", forRemoval = true)
396397
public static final boolean DISCOVERY_ENABLED = false;
397398
/**
398-
* @deprecated Use {@link org.hibernate.search.backend.elasticsearch.client.rest4.cfg.ClientRestElasticsearchBackendClientSettings.Defaults#DISCOVERY_REFRESH_INTERVAL} instead.
399+
* @deprecated Use {@link ClientRest4ElasticsearchBackendClientSettings.Defaults#DISCOVERY_REFRESH_INTERVAL} instead.
399400
* The default value itself is not deprecated, just the constant defining it moved to a different, client-specific class.
400401
*/
401402
@Deprecated(since = "8.2", forRemoval = true)

0 commit comments

Comments
 (0)