exist

判断单条数据是否存在

  1. ///
  2. /// \brief exist
  3. /// check value exist by key from the cluster.
  4. /// \param hashkey
  5. /// used to decide which partition to get this k-v
  6. /// \param sortkey
  7. /// all the k-v under hashkey will be sorted by sortkey.
  8. /// \param timeout_milliseconds
  9. /// if wait longer than this value, will return time out error
  10. /// \return
  11. /// int, the error indicates whether or not the operation is succeeded.
  12. /// this error can be converted to a string using get_error_string().
  13. /// returns PERR_OK if exist.
  14. /// returns PERR_NOT_FOUND if not exist.
  15. ///
  16. virtual int exist(const std::string &hashkey,
  17. const std::string &sortkey,
  18. int timeout_milliseconds = 5000,
  19. internal_info *info = NULL) = 0;