async_multi_get

异步读取多条数据

  1. ///
  2. /// \brief asynchronous multi_get
  3. /// get multiple value by key from the cluster.
  4. /// will not be blocked, return immediately.
  5. /// \param hashkey
  6. /// used to decide which partition to get this k-v
  7. /// \param sortkeys
  8. /// all the k-v under hashkey will be sorted by sortkey.
  9. /// if empty, means fetch all sortkeys under the hashkey.
  10. /// \param callback
  11. /// the callback function will be invoked after operation finished or error occurred.
  12. /// \param max_fetch_count
  13. /// max count of k-v pairs to be fetched. max_fetch_count <= 0 means no limit.
  14. /// \param max_fetch_size
  15. /// max size of k-v pairs to be fetched. max_fetch_size <= 0 means no limit.
  16. /// \param timeout_milliseconds
  17. /// if wait longer than this value, will return time out error
  18. /// \return
  19. /// void.
  20. ///
  21. virtual void async_multi_get(const std::string &hashkey,
  22. const std::set<std::string> &sortkeys,
  23. async_multi_get_callback_t &&callback = nullptr,
  24. int max_fetch_count = 100,
  25. int max_fetch_size = 1000000,
  26. int timeout_milliseconds = 5000) = 0;