Skip to content

Commit 7ac1734

Browse files
echatman-iasreugn
andauthored
Use IAerospikeReactorClient where possible instead of AerospikeReactorClient (#477)
Co-authored-by: Eugene R <[email protected]>
1 parent 07094ef commit 7ac1734

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/main/asciidoc/reference/aerospike-reactive-repositories.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,12 @@ public class ReactiveRepositoryExample {
150150
@Autowired
151151
ReactiveAerospikeOperations aerospikeOperations;
152152
@Autowired
153-
AerospikeReactorClient client;
153+
IAerospikeReactorClient client;
154154
155155
public RepositoryExample(ApplicationContext ctx) {
156156
aerospikeOperations = ctx.getBean(ReactiveAerospikeTemplate.class);
157157
repository = (ReactivePersonRepository) ctx.getBean("reactivePersonRepository");
158-
client = ctx.getBean(AerospikeReactorClient.class);
158+
client = ctx.getBean(IAerospikeReactorClient.class);
159159
}
160160
161161
protected void setUp() {

src/main/java/org/springframework/data/aerospike/config/AbstractReactiveAerospikeDataConfiguration.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.aerospike.client.async.EventLoops;
2020
import com.aerospike.client.policy.ClientPolicy;
2121
import com.aerospike.client.reactor.AerospikeReactorClient;
22+
import com.aerospike.client.reactor.IAerospikeReactorClient;
2223
import org.springframework.beans.factory.ObjectProvider;
2324
import org.springframework.context.annotation.Bean;
2425
import org.springframework.context.annotation.Configuration;
@@ -49,14 +50,14 @@ public abstract class AbstractReactiveAerospikeDataConfiguration extends Aerospi
4950
public ReactiveAerospikeTemplate reactiveAerospikeTemplate(MappingAerospikeConverter mappingAerospikeConverter,
5051
AerospikeMappingContext aerospikeMappingContext,
5152
AerospikeExceptionTranslator aerospikeExceptionTranslator,
52-
AerospikeReactorClient aerospikeReactorClient,
53+
IAerospikeReactorClient aerospikeReactorClient,
5354
ReactorQueryEngine reactorQueryEngine, ReactorIndexRefresher reactorIndexRefresher) {
5455
return new ReactiveAerospikeTemplate(aerospikeReactorClient, nameSpace(), mappingAerospikeConverter, aerospikeMappingContext,
5556
aerospikeExceptionTranslator, reactorQueryEngine, reactorIndexRefresher);
5657
}
5758

5859
@Bean(name = "reactiveAerospikeQueryEngine")
59-
public ReactorQueryEngine reactorQueryEngine(AerospikeReactorClient aerospikeReactorClient,
60+
public ReactorQueryEngine reactorQueryEngine(IAerospikeReactorClient aerospikeReactorClient,
6061
StatementBuilder statementBuilder,
6162
FilterExpressionsBuilder filterExpressionsBuilder) {
6263
ReactorQueryEngine queryEngine = new ReactorQueryEngine(aerospikeReactorClient, statementBuilder, filterExpressionsBuilder, aerospikeReactorClient.getQueryPolicyDefault());
@@ -65,15 +66,15 @@ public ReactorQueryEngine reactorQueryEngine(AerospikeReactorClient aerospikeRea
6566
}
6667

6768
@Bean(name = "reactiveAerospikeIndexRefresher")
68-
public ReactorIndexRefresher reactorIndexRefresher(AerospikeReactorClient aerospikeReactorClient, IndexesCacheUpdater indexesCacheUpdater) {
69+
public ReactorIndexRefresher reactorIndexRefresher(IAerospikeReactorClient aerospikeReactorClient, IndexesCacheUpdater indexesCacheUpdater) {
6970
ReactorIndexRefresher refresher = new ReactorIndexRefresher(aerospikeReactorClient, aerospikeReactorClient.getInfoPolicyDefault(),
7071
new InternalIndexOperations(new IndexInfoParser()), indexesCacheUpdater);
7172
refresher.refreshIndexes().block();
7273
return refresher;
7374
}
7475

7576
@Bean(name = "aerospikeReactorClient")
76-
public AerospikeReactorClient aerospikeReactorClient(IAerospikeClient aerospikeClient) {
77+
public IAerospikeReactorClient aerospikeReactorClient(IAerospikeClient aerospikeClient) {
7778
return new AerospikeReactorClient(aerospikeClient);
7879
}
7980

src/main/java/org/springframework/data/aerospike/core/ReactiveAerospikeTemplate.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import com.aerospike.client.query.IndexCollectionType;
2626
import com.aerospike.client.query.IndexType;
2727
import com.aerospike.client.query.KeyRecord;
28-
import com.aerospike.client.reactor.AerospikeReactorClient;
2928
import com.aerospike.client.reactor.IAerospikeReactorClient;
3029
import lombok.extern.slf4j.Slf4j;
3130
import org.springframework.data.aerospike.convert.AerospikeWriteData;
@@ -63,11 +62,11 @@
6362
@Slf4j
6463
public class ReactiveAerospikeTemplate extends BaseAerospikeTemplate implements ReactiveAerospikeOperations {
6564

66-
private final AerospikeReactorClient reactorClient;
65+
private final IAerospikeReactorClient reactorClient;
6766
private final ReactorQueryEngine queryEngine;
6867
private final ReactorIndexRefresher reactorIndexRefresher;
6968

70-
public ReactiveAerospikeTemplate(AerospikeReactorClient reactorClient,
69+
public ReactiveAerospikeTemplate(IAerospikeReactorClient reactorClient,
7170
String namespace,
7271
MappingAerospikeConverter converter,
7372
AerospikeMappingContext mappingContext,

src/test/java/org/springframework/data/aerospike/BaseReactiveIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.springframework.data.aerospike;
22

3-
import com.aerospike.client.reactor.AerospikeReactorClient;
3+
import com.aerospike.client.reactor.IAerospikeReactorClient;
44
import org.springframework.beans.factory.annotation.Autowired;
55
import org.springframework.boot.test.context.SpringBootTest;
66
import org.springframework.data.aerospike.config.CommonTestConfig;
@@ -22,7 +22,7 @@ public abstract class BaseReactiveIntegrationTests extends BaseIntegrationTests
2222
@Autowired
2323
protected ReactiveAerospikeTemplate reactiveTemplate;
2424
@Autowired
25-
protected AerospikeReactorClient reactorClient;
25+
protected IAerospikeReactorClient reactorClient;
2626

2727
protected <T> T findById(Serializable id, Class<T> type) {
2828
return reactiveTemplate.findById(id, type).block();

0 commit comments

Comments
 (0)