Skip to content

rename a couple of package private classes to a consistent naming scheme #1869

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@
* @author Sascha Woo
* @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 RequestFactory requestFactory;

@Nullable protected final Class<?> boundClass;
@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");

Expand All @@ -66,7 +66,7 @@ public AbstractDefaultIndexOperations(ElasticsearchConverter elasticsearchConver
this.boundIndex = null;
}

public AbstractDefaultIndexOperations(ElasticsearchConverter elasticsearchConverter, IndexCoordinates boundIndex) {
public AbstractIndexTemplate(ElasticsearchConverter elasticsearchConverter, IndexCoordinates boundIndex) {

Assert.notNull(boundIndex, "boundIndex may not be null");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,15 @@ public IndexOperations indexOps(Class<?> clazz) {

Assert.notNull(clazz, "clazz must not be null");

return new DefaultIndexOperations(this, clazz);
return new RestIndexTemplate(this, clazz);
}

@Override
public IndexOperations indexOps(IndexCoordinates index) {

Assert.notNull(index, "index must not be null");

return new DefaultIndexOperations(this, index);
return new RestIndexTemplate(this, index);
}
// endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ public IndexOperations indexOps(Class<?> clazz) {

Assert.notNull(clazz, "clazz must not be null");

return new DefaultTransportIndexOperations(client, elasticsearchConverter, clazz);
return new TransportIndexTemplate(client, elasticsearchConverter, clazz);
}

@Override
public IndexOperations indexOps(IndexCoordinates index) {

Assert.notNull(index, "index must not be null");

return new DefaultTransportIndexOperations(client, elasticsearchConverter, index);
return new TransportIndexTemplate(client, elasticsearchConverter, index);
}
// endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -963,12 +963,12 @@ public ElasticsearchConverter getElasticsearchConverter() {

@Override
public ReactiveIndexOperations indexOps(IndexCoordinates index) {
return new DefaultReactiveIndexOperations(this, index);
return new ReactiveIndexTemplate(this, index);
}

@Override
public ReactiveIndexOperations indexOps(Class<?> clazz) {
return new DefaultReactiveIndexOperations(this, clazz);
return new ReactiveIndexTemplate(this, clazz);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@
* @author George Popides
* @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;
private final IndexCoordinates boundIndex;
private final RequestFactory requestFactory;
private final ReactiveElasticsearchOperations operations;
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(index, "index must not be null");
Expand All @@ -85,7 +85,7 @@ public DefaultReactiveIndexOperations(ReactiveElasticsearchOperations operations
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(clazz, "clazz must not be null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,18 @@
* @author George Popides
* @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;

public DefaultIndexOperations(ElasticsearchRestTemplate restTemplate, Class<?> boundClass) {
public RestIndexTemplate(ElasticsearchRestTemplate restTemplate, Class<?> boundClass) {
super(restTemplate.getElasticsearchConverter(), boundClass);
this.restTemplate = restTemplate;
}

public DefaultIndexOperations(ElasticsearchRestTemplate restTemplate, IndexCoordinates boundIndex) {
public RestIndexTemplate(ElasticsearchRestTemplate restTemplate, IndexCoordinates boundIndex) {
super(restTemplate.getElasticsearchConverter(), boundIndex);
this.restTemplate = restTemplate;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,20 @@
* @author George Popides
* @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;

public DefaultTransportIndexOperations(Client client, ElasticsearchConverter elasticsearchConverter,
Class<?> boundClass) {
public TransportIndexTemplate(Client client, ElasticsearchConverter elasticsearchConverter,
Class<?> boundClass) {
super(elasticsearchConverter, boundClass);
this.client = client;
}

public DefaultTransportIndexOperations(Client client, ElasticsearchConverter elasticsearchConverter,
IndexCoordinates boundIndex) {
public TransportIndexTemplate(Client client, ElasticsearchConverter elasticsearchConverter,
IndexCoordinates boundIndex) {
super(elasticsearchConverter, boundIndex);
this.client = client;
}
Expand Down