rename a couple of package private classes to a consistent naming scheme.
Original Pull Request #1869 Closes #1868
This commit is contained in:
committed by
GitHub
parent
27094724dc
commit
039e59d3c2
@@ -46,9 +46,9 @@ import org.springframework.util.Assert;
|
|||||||
* @author Sascha Woo
|
* @author Sascha Woo
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
abstract class AbstractDefaultIndexOperations implements IndexOperations {
|
abstract class AbstractIndexTemplate implements IndexOperations {
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractDefaultIndexOperations.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractIndexTemplate.class);
|
||||||
|
|
||||||
protected final ElasticsearchConverter elasticsearchConverter;
|
protected final ElasticsearchConverter elasticsearchConverter;
|
||||||
protected final RequestFactory requestFactory;
|
protected final RequestFactory requestFactory;
|
||||||
@@ -56,7 +56,7 @@ abstract class AbstractDefaultIndexOperations implements IndexOperations {
|
|||||||
@Nullable protected final Class<?> boundClass;
|
@Nullable protected final Class<?> boundClass;
|
||||||
@Nullable private final IndexCoordinates boundIndex;
|
@Nullable private final IndexCoordinates boundIndex;
|
||||||
|
|
||||||
public AbstractDefaultIndexOperations(ElasticsearchConverter elasticsearchConverter, Class<?> boundClass) {
|
public AbstractIndexTemplate(ElasticsearchConverter elasticsearchConverter, Class<?> boundClass) {
|
||||||
|
|
||||||
Assert.notNull(boundClass, "boundClass may not be null");
|
Assert.notNull(boundClass, "boundClass may not be null");
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ abstract class AbstractDefaultIndexOperations implements IndexOperations {
|
|||||||
this.boundIndex = null;
|
this.boundIndex = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AbstractDefaultIndexOperations(ElasticsearchConverter elasticsearchConverter, IndexCoordinates boundIndex) {
|
public AbstractIndexTemplate(ElasticsearchConverter elasticsearchConverter, IndexCoordinates boundIndex) {
|
||||||
|
|
||||||
Assert.notNull(boundIndex, "boundIndex may not be null");
|
Assert.notNull(boundIndex, "boundIndex may not be null");
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@ public class ElasticsearchRestTemplate extends AbstractElasticsearchTemplate {
|
|||||||
|
|
||||||
Assert.notNull(clazz, "clazz must not be null");
|
Assert.notNull(clazz, "clazz must not be null");
|
||||||
|
|
||||||
return new DefaultIndexOperations(this, clazz);
|
return new RestIndexTemplate(this, clazz);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -139,7 +139,7 @@ public class ElasticsearchRestTemplate extends AbstractElasticsearchTemplate {
|
|||||||
|
|
||||||
Assert.notNull(index, "index must not be null");
|
Assert.notNull(index, "index must not be null");
|
||||||
|
|
||||||
return new DefaultIndexOperations(this, index);
|
return new RestIndexTemplate(this, index);
|
||||||
}
|
}
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ public class ElasticsearchTemplate extends AbstractElasticsearchTemplate {
|
|||||||
|
|
||||||
Assert.notNull(clazz, "clazz must not be null");
|
Assert.notNull(clazz, "clazz must not be null");
|
||||||
|
|
||||||
return new DefaultTransportIndexOperations(client, elasticsearchConverter, clazz);
|
return new TransportIndexTemplate(client, elasticsearchConverter, clazz);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -142,7 +142,7 @@ public class ElasticsearchTemplate extends AbstractElasticsearchTemplate {
|
|||||||
|
|
||||||
Assert.notNull(index, "index must not be null");
|
Assert.notNull(index, "index must not be null");
|
||||||
|
|
||||||
return new DefaultTransportIndexOperations(client, elasticsearchConverter, index);
|
return new TransportIndexTemplate(client, elasticsearchConverter, index);
|
||||||
}
|
}
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
|
|||||||
@@ -963,12 +963,12 @@ public class ReactiveElasticsearchTemplate implements ReactiveElasticsearchOpera
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ReactiveIndexOperations indexOps(IndexCoordinates index) {
|
public ReactiveIndexOperations indexOps(IndexCoordinates index) {
|
||||||
return new DefaultReactiveIndexOperations(this, index);
|
return new ReactiveIndexTemplate(this, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ReactiveIndexOperations indexOps(Class<?> clazz) {
|
public ReactiveIndexOperations indexOps(Class<?> clazz) {
|
||||||
return new DefaultReactiveIndexOperations(this, clazz);
|
return new ReactiveIndexTemplate(this, clazz);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -63,9 +63,9 @@ import org.springframework.util.Assert;
|
|||||||
* @author George Popides
|
* @author George Popides
|
||||||
* @since 4.1
|
* @since 4.1
|
||||||
*/
|
*/
|
||||||
class DefaultReactiveIndexOperations implements ReactiveIndexOperations {
|
class ReactiveIndexTemplate implements ReactiveIndexOperations {
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(DefaultReactiveIndexOperations.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(ReactiveIndexTemplate.class);
|
||||||
|
|
||||||
@Nullable private final Class<?> boundClass;
|
@Nullable private final Class<?> boundClass;
|
||||||
private final IndexCoordinates boundIndex;
|
private final IndexCoordinates boundIndex;
|
||||||
@@ -73,7 +73,7 @@ class DefaultReactiveIndexOperations implements ReactiveIndexOperations {
|
|||||||
private final ReactiveElasticsearchOperations operations;
|
private final ReactiveElasticsearchOperations operations;
|
||||||
private final ElasticsearchConverter converter;
|
private final ElasticsearchConverter converter;
|
||||||
|
|
||||||
public DefaultReactiveIndexOperations(ReactiveElasticsearchOperations operations, IndexCoordinates index) {
|
public ReactiveIndexTemplate(ReactiveElasticsearchOperations operations, IndexCoordinates index) {
|
||||||
|
|
||||||
Assert.notNull(operations, "operations must not be null");
|
Assert.notNull(operations, "operations must not be null");
|
||||||
Assert.notNull(index, "index must not be null");
|
Assert.notNull(index, "index must not be null");
|
||||||
@@ -85,7 +85,7 @@ class DefaultReactiveIndexOperations implements ReactiveIndexOperations {
|
|||||||
this.boundIndex = index;
|
this.boundIndex = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DefaultReactiveIndexOperations(ReactiveElasticsearchOperations operations, Class<?> clazz) {
|
public ReactiveIndexTemplate(ReactiveElasticsearchOperations operations, Class<?> clazz) {
|
||||||
|
|
||||||
Assert.notNull(operations, "operations must not be null");
|
Assert.notNull(operations, "operations must not be null");
|
||||||
Assert.notNull(clazz, "clazz must not be null");
|
Assert.notNull(clazz, "clazz must not be null");
|
||||||
@@ -64,18 +64,18 @@ import org.springframework.util.Assert;
|
|||||||
* @author George Popides
|
* @author George Popides
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
class DefaultIndexOperations extends AbstractDefaultIndexOperations implements IndexOperations {
|
class RestIndexTemplate extends AbstractIndexTemplate implements IndexOperations {
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(DefaultIndexOperations.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(RestIndexTemplate.class);
|
||||||
|
|
||||||
private final ElasticsearchRestTemplate restTemplate;
|
private final ElasticsearchRestTemplate restTemplate;
|
||||||
|
|
||||||
public DefaultIndexOperations(ElasticsearchRestTemplate restTemplate, Class<?> boundClass) {
|
public RestIndexTemplate(ElasticsearchRestTemplate restTemplate, Class<?> boundClass) {
|
||||||
super(restTemplate.getElasticsearchConverter(), boundClass);
|
super(restTemplate.getElasticsearchConverter(), boundClass);
|
||||||
this.restTemplate = restTemplate;
|
this.restTemplate = restTemplate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DefaultIndexOperations(ElasticsearchRestTemplate restTemplate, IndexCoordinates boundIndex) {
|
public RestIndexTemplate(ElasticsearchRestTemplate restTemplate, IndexCoordinates boundIndex) {
|
||||||
super(restTemplate.getElasticsearchConverter(), boundIndex);
|
super(restTemplate.getElasticsearchConverter(), boundIndex);
|
||||||
this.restTemplate = restTemplate;
|
this.restTemplate = restTemplate;
|
||||||
}
|
}
|
||||||
@@ -69,20 +69,20 @@ import org.springframework.util.Assert;
|
|||||||
* @author George Popides
|
* @author George Popides
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
class DefaultTransportIndexOperations extends AbstractDefaultIndexOperations implements IndexOperations {
|
class TransportIndexTemplate extends AbstractIndexTemplate implements IndexOperations {
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(DefaultTransportIndexOperations.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(TransportIndexTemplate.class);
|
||||||
|
|
||||||
private final Client client;
|
private final Client client;
|
||||||
|
|
||||||
public DefaultTransportIndexOperations(Client client, ElasticsearchConverter elasticsearchConverter,
|
public TransportIndexTemplate(Client client, ElasticsearchConverter elasticsearchConverter,
|
||||||
Class<?> boundClass) {
|
Class<?> boundClass) {
|
||||||
super(elasticsearchConverter, boundClass);
|
super(elasticsearchConverter, boundClass);
|
||||||
this.client = client;
|
this.client = client;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DefaultTransportIndexOperations(Client client, ElasticsearchConverter elasticsearchConverter,
|
public TransportIndexTemplate(Client client, ElasticsearchConverter elasticsearchConverter,
|
||||||
IndexCoordinates boundIndex) {
|
IndexCoordinates boundIndex) {
|
||||||
super(elasticsearchConverter, boundIndex);
|
super(elasticsearchConverter, boundIndex);
|
||||||
this.client = client;
|
this.client = client;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user