async_get

异步读取一条数据

  1. ///
  2. /// \brief asynchronous get
  3. /// get 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 sortkey
  8. /// all the k-v under hashkey will be sorted by sortkey.
  9. /// \param callback
  10. /// the callback function will be invoked after operation finished or error occurred.
  11. /// \param timeout_milliseconds
  12. /// if wait longer than this value, will return time out error
  13. /// \return
  14. /// void.
  15. ///
  16. virtual void async_get(const std::string &hashkey,
  17. const std::string &sortkey,
  18. async_get_callback_t &&callback = nullptr,
  19. int timeout_milliseconds = 5000) = 0;