async_multi_set

异步写多条数据

  1. ///
  2. /// \brief asynchronous multi_set (guarantee atomicity)
  3. /// store multiple k-v of the same hashkey to the cluster.
  4. /// will not be blocked, return immediately.
  5. /// \param hashkey
  6. /// used to decide which partition to put this k-v
  7. /// \param kvs
  8. /// all <sortkey,value> pairs to be set. should not be empty
  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. /// \param ttl_seconds
  14. /// time to live of this value, if expired, will return not found; 0 means no ttl
  15. /// \return
  16. /// void.
  17. ///
  18. virtual void async_multi_set(const std::string &hashkey,
  19. const std::map<std::string, std::string> &kvs,
  20. async_multi_set_callback_t &&callback = nullptr,
  21. int timeout_milliseconds = 5000,
  22. int ttl_seconds = 0) = 0;