reprepare
Reprepares a key with a new value that never expires.
This method updates an existing key preparation with a new permanent value. The old value is used for optimistic concurrency control.
Return
A Mono emitting true if reprepare succeeded, false otherwise
Parameters
The key to reprepare
The expected current value for concurrency control
The new value to prepare permanently
See also
(String, V, PreparedValue) for TTL-based reprepare
Reprepares a key with a new value that may have TTL.
This method updates an existing key preparation with a new value and optional TTL. The old value ensures atomicity and prevents concurrent modifications.
Return
A Mono emitting true if reprepare succeeded, false otherwise
Parameters
The key to reprepare
The expected current value for concurrency control
The new prepared value with optional TTL
Reprepares a key with a new permanent value.
This method updates the value for an existing key preparation, keeping it permanent.
Return
A Mono emitting true if reprepare succeeded, false otherwise
Parameters
The key to reprepare
The new permanent value
Reprepares a key with a new value that may have TTL.
This method updates the value for an existing key preparation with optional TTL.
Return
A Mono emitting true if reprepare succeeded, false otherwise
Parameters
The key to reprepare
The new prepared value with optional TTL
Reprepares by changing both key and value to new permanent values.
This method atomically releases the old key and prepares the new key. It's commonly used for scenarios like username changes where the identifier itself changes.
Return
A Mono emitting true if the key change succeeded, false otherwise
Parameters
The current key to release
The expected value of the old key for concurrency control
The new key to prepare
The permanent value for the new key
Throws
if oldKey equals newKey
Reprepares by changing both key and value with optional TTL.
This method provides the most flexible reprepare operation, allowing changes to both the key and value with TTL support. It ensures atomicity by first preparing the new key, then rolling back the old key only if successful.
Return
A Mono emitting true if the key change succeeded, false otherwise
Parameters
The current key to release
The expected value of the old key for concurrency control
The new key to prepare (must be different from oldKey)
The prepared value for the new key with optional TTL
Throws
if oldKey equals newKey
if rollback of old key fails after new key is prepared