multi_get_sortkeys

获取hashkey下面的多个sortkey,不返回value

  1. ///
  2. /// \brief multi_get_sortkeys
  3. /// get multiple sort keys by hash key from the cluster.
  4. /// only fetch sort keys, but not fetch values.
  5. /// \param hashkey
  6. /// used to decide which partition to get this k-v
  7. /// \param sortkeys
  8. /// the returned sort keys will be put into it.
  9. /// \param max_fetch_count
  10. /// max count of sort keys to be fetched. max_fetch_count <= 0 means no limit.
  11. /// \param max_fetch_size
  12. /// max size of sort keys to be fetched. max_fetch_size <= 0 means no limit.
  13. /// \param timeout_milliseconds
  14. /// if wait longer than this value, will return time out error
  15. /// \return
  16. /// int, the error indicates whether or not the operation is succeeded.
  17. /// this error can be converted to a string using get_error_string().
  18. /// returns PERR_OK if fetch done, even no data is returned.
  19. /// returns PERR_INCOMPLETE is only partial data is fetched.
  20. ///
  21. virtual int multi_get_sortkeys(const std::string &hashkey,
  22. std::set<std::string> &sortkeys,
  23. int max_fetch_count = 100,
  24. int max_fetch_size = 1000000,
  25. int timeout_milliseconds = 5000,
  26. internal_info *info = NULL) = 0;

注:max_fetch_count 和 max_fetch_size 分别限制返回的sortkey的个数与总大小(计算大小的时候,为每条sortkey都计算一次hashkey的大小)