| 49 | } |
| 50 | |
| 51 | int64_t ProcessStateInfo::GetInt64(const string& state_key) const { |
| 52 | ProcessStateMap::const_iterator it = process_state_map_.find(state_key); |
| 53 | if (it != process_state_map_.end()) { |
| 54 | StringParser::ParseResult result; |
| 55 | int64_t state_value = StringParser::StringToInt<int64_t>(it->second.data(), |
| 56 | it->second.size(), &result); |
| 57 | if (result == StringParser::PARSE_SUCCESS) return state_value; |
| 58 | } |
| 59 | return -1; |
| 60 | } |
| 61 | |
| 62 | string ProcessStateInfo::GetString(const string& state_key) const { |
| 63 | ProcessStateMap::const_iterator it = process_state_map_.find(state_key); |