#include <userver/storages/redis/pttl_reply.hpp>
Parsed PTTL / HPTTL reply (millisecond precision).
Sibling of TtlReply for the millisecond-precision variants of the TTL commands. Reuses KeyHasNoExpirationException for its error case.
Definition at line 21 of file pttl_reply.hpp.
Public Types | |
| enum class | PttlReplyValue : std::int8_t { kKeyDoesNotExist = -2 , kKeyHasNoExpiration = -1 } |
Public Member Functions | |
| PttlReply (int64_t value) | |
| PttlReply (PttlReplyValue value) | |
| bool | KeyExists () const |
| bool | KeyHasExpiration () const |
| std::chrono::milliseconds | GetExpire () const |
Returns the expiration as std::chrono::milliseconds. Throws KeyHasNoExpirationException if the key/field has no expiration. | |
Static Public Member Functions | |
| static PttlReply | Parse (ReplyData &&reply_data, const std::string &request_description={}) |
| Parse a reply from a milliseconds-precision command (PTTL / HPTTL). | |
Static Public Attributes | |
| static constexpr PttlReplyValue | kKeyDoesNotExist = PttlReplyValue::kKeyDoesNotExist |
| static constexpr PttlReplyValue | kKeyHasNoExpiration = PttlReplyValue::kKeyHasNoExpiration |
|
strong |
Definition at line 23 of file pttl_reply.hpp.
|
staticconstexpr |
Definition at line 28 of file pttl_reply.hpp.
|
staticconstexpr |
Definition at line 29 of file pttl_reply.hpp.