Reject withDurability(durabilityLevel) in transactions.

Closes #1492.
This commit is contained in:
Michael Reiche
2022-07-13 13:55:22 -07:00
parent 751643d4c4
commit 8285b2f62a
4 changed files with 35 additions and 0 deletions

View File

@@ -127,6 +127,9 @@ public class ReactiveInsertByIdOperationSupport implements ReactiveInsertByIdOpe
if (this.expiry != null) {
throw new IllegalArgumentException("withExpiry is not supported in a transaction");
}
if (this.durabilityLevel != null && this.durabilityLevel != DurabilityLevel.NONE) {
throw new IllegalArgumentException("withDurability is not supported in a transaction");
}
if (this.options != null) {
throw new IllegalArgumentException("withOptions is not supported in a transaction");
}

View File

@@ -134,6 +134,9 @@ public class ReactiveRemoveByIdOperationSupport implements ReactiveRemoveByIdOpe
throw new IllegalArgumentException(
"withDurability PersistTo and ReplicateTo overload is not supported in a transaction");
}
if (this.durabilityLevel != null && this.durabilityLevel != DurabilityLevel.NONE) {
throw new IllegalArgumentException("withDurability is not supported in a transaction");
}
if (this.options != null) {
throw new IllegalArgumentException("withOptions is not supported in a transaction");
}

View File

@@ -146,6 +146,9 @@ public class ReactiveReplaceByIdOperationSupport implements ReactiveReplaceByIdO
if (this.expiry != null) {
throw new IllegalArgumentException("withExpiry is not supported in a transaction");
}
if (this.durabilityLevel != null && this.durabilityLevel != DurabilityLevel.NONE) {
throw new IllegalArgumentException("withDurability is not supported in a transaction");
}
if (this.options != null) {
throw new IllegalArgumentException("withOptions is not supported in a transaction");
}