#include <userver/storages/redis/command_options.hpp>
Options for MSETEX (NX/XX combined with EX/PX/EXAT/PXAT/KEEPTTL).
Definition at line 219 of file command_options.hpp.
Public Types | |
| enum class | Exist : std::uint8_t { kSetAlways , kSetIfNoneExist , kSetIfAllExist } |
| Existence precondition for the affected keys. More... | |
| enum class | TtlAction : std::uint8_t { kNone , kSetSeconds , kSetMilliseconds , kSetAtSeconds , kSetAtMilliseconds , kKeepTtl } |
| What TTL clause to attach to the new values. More... | |
Public Member Functions | |
| MsetexOptions & | OnlyIfNoneOfKeysExist () & |
| Chainable modifier — NX: write only if none of the affected keys currently exist. | |
| MsetexOptions & | OnlyIfAllKeysExist () & |
| Chainable modifier — XX: write only if all of the affected keys currently exist. | |
| MsetexOptions | OnlyIfNoneOfKeysExist () && |
| NX (rvalue overload). | |
| MsetexOptions | OnlyIfAllKeysExist () && |
| XX (rvalue overload). | |
Static Public Member Functions | |
| static MsetexOptions | NoTtl () |
| No TTL clause on the wire — server applies default behavior. | |
| static MsetexOptions | KeepTtl () |
| KEEPTTL — keep the existing TTL of each key if any. | |
| static MsetexOptions | Expire (std::chrono::milliseconds ttl) |
| Set TTL to a relative duration. Posted on the wire as PX (ms-precision). | |
| static MsetexOptions | ExpireAt (std::chrono::system_clock::time_point deadline) |
| Set TTL to an absolute deadline. Posted on the wire as PXAT (ms-precision). | |
Public Attributes | |
| Exist | exist {Exist::kSetAlways} |
| TtlAction | ttl_action {TtlAction::kNone} |
| std::chrono::milliseconds | ttl {0} |
|
strong |
Existence precondition for the affected keys.
| Enumerator | |
|---|---|
| kSetAlways | No precondition (default). |
| kSetIfNoneExist | NX — set only if none of the affected keys currently exists. |
| kSetIfAllExist | XX — set only if all of the affected keys currently exist. |
Definition at line 221 of file command_options.hpp.
|
strong |
What TTL clause to attach to the new values.
Definition at line 230 of file command_options.hpp.
|
inline |
Chainable modifier — XX: write only if all of the affected keys currently exist.
Definition at line 266 of file command_options.hpp.
|
inline |
XX (rvalue overload).
Definition at line 276 of file command_options.hpp.
|
inline |
Chainable modifier — NX: write only if none of the affected keys currently exist.
Definition at line 260 of file command_options.hpp.
|
inline |
NX (rvalue overload).
Definition at line 271 of file command_options.hpp.
| Exist storages::redis::MsetexOptions::exist {Exist::kSetAlways} |
Definition at line 245 of file command_options.hpp.
| std::chrono::milliseconds storages::redis::MsetexOptions::ttl {0} |
Definition at line 247 of file command_options.hpp.
| TtlAction storages::redis::MsetexOptions::ttl_action {TtlAction::kNone} |
Definition at line 246 of file command_options.hpp.