multi_set

写多条数据(同一hashkey下面)

  1. ///
  2. /// \brief multi_set (guarantee atomicity)
  3. /// store multiple k-v of the same hashkey to the cluster.
  4. /// \param hashkey
  5. /// used to decide which partition to put this k-v
  6. /// \param kvs
  7. /// all <sortkey,value> pairs to be set. should not be empty
  8. /// \param timeout_milliseconds
  9. /// if wait longer than this value, will return time out error
  10. /// \param ttl_seconds
  11. /// time to live of this value, if expired, will return not found; 0 means no ttl
  12. /// \return
  13. /// int, the error indicates whether or not the operation is succeeded.
  14. /// this error can be converted to a string using get_error_string().
  15. /// return PERR_INVALID_ARGUMENT if param kvs is empty.
  16. ///
  17. virtual int multi_set(const std::string &hashkey,
  18. const std::map<std::string, std::string> &kvs,
  19. int timeout_milliseconds = 5000,
  20. int ttl_seconds = 0,
  21. internal_info *info = NULL) = 0;