diff --git a/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeAutoConfiguration.java b/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeAutoConfiguration.java index ab34ed1..23528e3 100644 --- a/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeAutoConfiguration.java +++ b/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeAutoConfiguration.java @@ -108,7 +108,6 @@ private WritePolicy setupWritePolicy(AerospikeProperties properties) { WritePolicy policy = new WritePolicy(); setGeneralPolicyProperties(policy, writePolicyDefault); whenPresent(writePolicyDefault.durableDelete, p -> policy.durableDelete = p); - whenPresent(writePolicyDefault.sendKey, p -> policy.sendKey = p); return policy; } @@ -147,6 +146,7 @@ private void setGeneralPolicyProperties(Policy policy, AerospikeProperties.Polic whenPresent(policyDefault.timeoutDelay, p -> policy.timeoutDelay = (int) p.toMillis()); whenPresent(policyDefault.maxRetries, p -> policy.maxRetries = p); whenPresent(policyDefault.sleepBetweenRetries, p -> policy.sleepBetweenRetries = (int) p.toMillis()); + whenPresent(policyDefault.sendKey, p -> policy.sendKey = p); } private void whenPresent(T param, Consumer consumer) { diff --git a/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeProperties.java b/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeProperties.java index 3d1be9c..10ff6c1 100644 --- a/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeProperties.java +++ b/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeProperties.java @@ -146,6 +146,11 @@ public abstract static class PolicyDefault { * Time to sleep between retries. */ public Duration sleepBetweenRetries; + + /** + * If the key is sent on a write, the key will be stored with the record on the server. + */ + public Boolean sendKey; } /** @@ -191,11 +196,6 @@ public static class ReadPolicyDefault extends PolicyDefault { @Data public static class WritePolicyDefault extends PolicyDefault { - /** - * If the key is sent on a write, the key will be stored with the record on the server. - */ - public Boolean sendKey; - /** * If the transaction results in a record deletion, leave a tombstone for the record. */ @@ -212,10 +212,12 @@ public static class BatchPolicyDefault extends PolicyDefault { * Number of concurrent synchronous batch request threads to server nodes. */ public Integer maxConcurrentThreads; + /** * Allow batch to be processed immediately in the server's receiving thread. */ public Boolean allowInline; + /** * Send set name for every key in the batch. */