30 #ifndef GOOGLE_DATAFLOW_API_WORK_ITEM_SERVICE_STATE_H_ 31 #define GOOGLE_DATAFLOW_API_WORK_ITEM_SERVICE_STATE_H_ 34 #include "googleapis/base/integral_types.h" 35 #include "googleapis/base/macros.h" 36 #include "googleapis/client/data/jsoncpp_data.h" 37 #include "googleapis/strings/stringpiece.h" 39 #include "google/dataflow_api/approximate_progress.h" 40 #include "google/dataflow_api/approximate_split_request.h" 41 #include "google/dataflow_api/hot_key_detection.h" 42 #include "google/dataflow_api/metric_short_id.h" 43 #include "google/dataflow_api/position.h" 92 return StringPiece(
"google_dataflow_api::WorkItemServiceState");
101 return Storage().isMember(
"harnessData");
108 MutableStorage()->removeMember(
"harnessData");
116 const Json::Value& storage = Storage(
"harnessData");
117 return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<client::JsonCppData > >(storage);
130 Json::Value* storage = MutableStorage(
"harnessData");
131 return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<client::JsonCppData > >(storage);
140 return Storage().isMember(
"hotKeyDetection");
147 MutableStorage()->removeMember(
"hotKeyDetection");
175 return Storage().isMember(
"leaseExpireTime");
182 MutableStorage()->removeMember(
"leaseExpireTime");
190 const Json::Value& v = Storage(
"leaseExpireTime");
191 if (v == Json::Value::null)
return StringPiece(
"");
192 return StringPiece(v.asCString());
203 *MutableStorage(
"leaseExpireTime") = value.data();
212 return Storage().isMember(
"metricShortId");
219 MutableStorage()->removeMember(
"metricShortId");
226 const client::JsonCppArray<MetricShortId > get_metric_short_id()
const;
241 client::JsonCppArray<MetricShortId > mutable_metricShortId();
249 return Storage().isMember(
"nextReportIndex");
256 MutableStorage()->removeMember(
"nextReportIndex");
264 const Json::Value& storage = Storage(
"nextReportIndex");
265 return client::JsonValueToCppValueHelper<int64 >(storage);
278 client::SetJsonValueFromCppValueHelper<int64 >(
279 value, MutableStorage(
"nextReportIndex"));
288 return Storage().isMember(
"reportStatusInterval");
295 MutableStorage()->removeMember(
"reportStatusInterval");
303 const Json::Value& v = Storage(
"reportStatusInterval");
304 if (v == Json::Value::null)
return StringPiece(
"");
305 return StringPiece(v.asCString());
316 *MutableStorage(
"reportStatusInterval") = value.data();
325 return Storage().isMember(
"splitRequest");
332 MutableStorage()->removeMember(
"splitRequest");
358 return Storage().isMember(
"suggestedStopPoint");
365 MutableStorage()->removeMember(
"suggestedStopPoint");
393 return Storage().isMember(
"suggestedStopPosition");
400 MutableStorage()->removeMember(
"suggestedStopPosition");
408 const Position get_suggested_stop_position()
const;
418 Position mutable_suggestedStopPosition();
424 #endif // GOOGLE_DATAFLOW_API_WORK_ITEM_SERVICE_STATE_H_ void clear_report_status_interval()
Definition: work_item_service_state.h:294
void clear_suggested_stop_position()
Definition: work_item_service_state.h:399
void clear_next_report_index()
Definition: work_item_service_state.h:255
bool has_lease_expire_time() const
Definition: work_item_service_state.h:174
bool has_harness_data() const
Definition: work_item_service_state.h:100
void set_next_report_index(int64 value)
Definition: work_item_service_state.h:277
Definition: hot_key_detection.h:50
Definition: position.h:55
void set_report_status_interval(const StringPiece &value)
Definition: work_item_service_state.h:315
bool has_metric_short_id() const
Definition: work_item_service_state.h:211
void clear_harness_data()
Definition: work_item_service_state.h:107
void clear_metric_short_id()
Definition: work_item_service_state.h:218
bool has_suggested_stop_position() const
Definition: work_item_service_state.h:392
bool has_split_request() const
Definition: work_item_service_state.h:324
client::JsonCppAssociativeArray< client::JsonCppData > mutable_harnessData()
Definition: work_item_service_state.h:129
bool has_suggested_stop_point() const
Definition: work_item_service_state.h:357
void clear_hot_key_detection()
Definition: work_item_service_state.h:146
Definition: approximate_progress.h:40
bool has_hot_key_detection() const
Definition: work_item_service_state.h:139
void set_lease_expire_time(const StringPiece &value)
Definition: work_item_service_state.h:202
const StringPiece GetTypeName() const
Definition: work_item_service_state.h:91
const StringPiece get_report_status_interval() const
Definition: work_item_service_state.h:302
Definition: approximate_progress.h:52
bool has_report_status_interval() const
Definition: work_item_service_state.h:287
int64 get_next_report_index() const
Definition: work_item_service_state.h:263
void clear_split_request()
Definition: work_item_service_state.h:331
Definition: work_item_service_state.h:58
void clear_lease_expire_time()
Definition: work_item_service_state.h:181
Definition: approximate_progress.cc:42
const client::JsonCppAssociativeArray< client::JsonCppData > get_harness_data() const
Definition: work_item_service_state.h:115
bool has_next_report_index() const
Definition: work_item_service_state.h:248
const StringPiece get_lease_expire_time() const
Definition: work_item_service_state.h:189
Definition: approximate_split_request.h:51
void clear_suggested_stop_point()
Definition: work_item_service_state.h:364