ttl
获取单行数据的TTL时间。TTL表示Time To Live,表示该数据还能存活多久。如果超过存活时间,数据就读不到了
///
/// \brief ttl (time to live)
/// get ttl in seconds of this k-v.
/// key is composed of hashkey and sortkey. must provide both to get the value.
/// \param hashkey
/// used to decide which partition to get this k-v
/// \param sortkey
/// all the k-v under hashkey will be sorted by sortkey.
/// \param ttl_seconds
/// the returned ttl value in seconds.
/// \param timeout_milliseconds
/// if wait longer than this value, will return time out error
/// \return
/// int, the error indicates whether or not the operation is succeeded.
/// this error can be converted to a string using get_error_string()
///
virtual int ttl(const std::string &hashkey,
const std::string &sortkey,
int &ttl_seconds,
int timeout_milliseconds = 5000,
internal_info *info = NULL) = 0;