From f5fff734edbf4e9e9956764dbf5fcbc80e558e4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Dziepak?= Date: Tue, 28 Jul 2015 13:49:41 +0200 Subject: [PATCH] cq3: update_parameters: add getters for ttl and expiry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Dziepak --- cql3/update_parameters.hh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cql3/update_parameters.hh b/cql3/update_parameters.hh index 9a4972d9ca..aad3a8dbc5 100644 --- a/cql3/update_parameters.hh +++ b/cql3/update_parameters.hh @@ -154,6 +154,14 @@ public: } #endif + gc_clock::duration ttl() const { + return _ttl.count() > 0 ? _ttl : _schema->default_time_to_live(); + } + + gc_clock::time_point expiry() const { + return ttl() + _local_deletion_time; + } + api::timestamp_type timestamp() const { return _timestamp; }