diff --git a/src/main/java/org/springframework/data/aerospike/config/AbstractAerospikeDataConfiguration.java b/src/main/java/org/springframework/data/aerospike/config/AbstractAerospikeDataConfiguration.java index bdff2148..486246cd 100644 --- a/src/main/java/org/springframework/data/aerospike/config/AbstractAerospikeDataConfiguration.java +++ b/src/main/java/org/springframework/data/aerospike/config/AbstractAerospikeDataConfiguration.java @@ -46,7 +46,8 @@ public AerospikeTemplate aerospikeTemplate(IAerospikeClient aerospikeClient, AerospikeExceptionTranslator aerospikeExceptionTranslator, QueryEngine queryEngine, IndexRefresher indexRefresher, ServerVersionSupport serverVersionSupport, - AerospikeSettings settings) { + AerospikeSettings settings) + { return new AerospikeTemplate(aerospikeClient, settings.getDataSettings().getNamespace(), mappingAerospikeConverter, aerospikeMappingContext, aerospikeExceptionTranslator, queryEngine, indexRefresher, serverVersionSupport); @@ -55,7 +56,8 @@ public AerospikeTemplate aerospikeTemplate(IAerospikeClient aerospikeClient, @Bean(name = "aerospikeQueryEngine") public QueryEngine queryEngine(IAerospikeClient aerospikeClient, StatementBuilder statementBuilder, - FilterExpressionsBuilder filterExpressionsBuilder, AerospikeSettings settings) { + FilterExpressionsBuilder filterExpressionsBuilder, AerospikeSettings settings) + { QueryEngine queryEngine = new QueryEngine(aerospikeClient, statementBuilder, filterExpressionsBuilder, settings.getDataSettings()); boolean scansEnabled = settings.getDataSettings().isScansEnabled(); @@ -76,7 +78,8 @@ public QueryEngine queryEngine(IAerospikeClient aerospikeClient, public AerospikePersistenceEntityIndexCreator aerospikePersistenceEntityIndexCreator( ObjectProvider aerospikeMappingContext, AerospikeIndexResolver aerospikeIndexResolver, - ObjectProvider template, AerospikeSettings settings) { + ObjectProvider template, AerospikeSettings settings) + { boolean indexesOnStartup = settings.getDataSettings().isCreateIndexesOnStartup(); log.info("AerospikeDataSettings.indexesOnStartup: {}", indexesOnStartup); return new AerospikePersistenceEntityIndexCreator(aerospikeMappingContext, indexesOnStartup, @@ -85,7 +88,8 @@ public AerospikePersistenceEntityIndexCreator aerospikePersistenceEntityIndexCre @Bean(name = "aerospikeIndexRefresher") public IndexRefresher indexRefresher(IAerospikeClient aerospikeClient, IndexesCacheUpdater indexesCacheUpdater, - ServerVersionSupport serverVersionSupport, AerospikeSettings settings) { + ServerVersionSupport serverVersionSupport, AerospikeSettings settings) + { IndexRefresher refresher = new IndexRefresher(aerospikeClient, aerospikeClient.getInfoPolicyDefault(), new InternalIndexOperations(new IndexInfoParser()), indexesCacheUpdater, serverVersionSupport); refresher.refreshIndexes(); diff --git a/src/main/java/org/springframework/data/aerospike/config/AbstractReactiveAerospikeDataConfiguration.java b/src/main/java/org/springframework/data/aerospike/config/AbstractReactiveAerospikeDataConfiguration.java index 965d8820..e4ae934c 100644 --- a/src/main/java/org/springframework/data/aerospike/config/AbstractReactiveAerospikeDataConfiguration.java +++ b/src/main/java/org/springframework/data/aerospike/config/AbstractReactiveAerospikeDataConfiguration.java @@ -55,7 +55,8 @@ public ReactiveAerospikeTemplate reactiveAerospikeTemplate(MappingAerospikeConve ReactorQueryEngine reactorQueryEngine, ReactorIndexRefresher reactorIndexRefresher, ServerVersionSupport serverVersionSupport, - AerospikeSettings settings) { + AerospikeSettings settings) + { return new ReactiveAerospikeTemplate(aerospikeReactorClient, settings.getDataSettings().getNamespace(), mappingAerospikeConverter, aerospikeMappingContext, aerospikeExceptionTranslator, reactorQueryEngine, reactorIndexRefresher, serverVersionSupport); @@ -65,7 +66,8 @@ public ReactiveAerospikeTemplate reactiveAerospikeTemplate(MappingAerospikeConve public ReactorQueryEngine reactorQueryEngine(IAerospikeReactorClient aerospikeReactorClient, StatementBuilder statementBuilder, FilterExpressionsBuilder filterExpressionsBuilder, - AerospikeSettings settings) { + AerospikeSettings settings) + { ReactorQueryEngine queryEngine = new ReactorQueryEngine(aerospikeReactorClient, statementBuilder, filterExpressionsBuilder, settings.getDataSettings()); boolean scansEnabled = settings.getDataSettings().isScansEnabled(); @@ -85,7 +87,8 @@ public ReactorQueryEngine reactorQueryEngine(IAerospikeReactorClient aerospikeRe @Bean(name = "reactiveAerospikeIndexRefresher") public ReactorIndexRefresher reactorIndexRefresher(IAerospikeReactorClient aerospikeReactorClient, IndexesCacheUpdater indexesCacheUpdater, - ServerVersionSupport serverVersionSupport) { + ServerVersionSupport serverVersionSupport) + { ReactorIndexRefresher refresher = new ReactorIndexRefresher(aerospikeReactorClient, aerospikeReactorClient.getInfoPolicyDefault(), new InternalIndexOperations(new IndexInfoParser()), indexesCacheUpdater, serverVersionSupport); @@ -106,10 +109,11 @@ protected ClientPolicy getClientPolicy() { } @Bean(name = "reactiveAerospikePersistenceEntityIndexCreator") - public ReactiveAerospikePersistenceEntityIndexCreator aerospikePersistenceEntityIndexCreator( + public ReactiveAerospikePersistenceEntityIndexCreator aerospikeReactivePersistenceEntityIndexCreator( ObjectProvider aerospikeMappingContext, AerospikeIndexResolver aerospikeIndexResolver, - ObjectProvider template, AerospikeSettings settings) { + ObjectProvider template, AerospikeSettings settings) + { boolean indexesOnStartup = settings.getDataSettings().isCreateIndexesOnStartup(); log.info("AerospikeDataSettings.indexesOnStartup: {}", indexesOnStartup); return new ReactiveAerospikePersistenceEntityIndexCreator(aerospikeMappingContext,