4 #ifndef PROTOBUF_cluster_2eproto__INCLUDED
5 #define PROTOBUF_cluster_2eproto__INCLUDED
9 #include <google/protobuf/stubs/common.h>
11 #if GOOGLE_PROTOBUF_VERSION < 2005000
12 #error This file was generated by a newer version of protoc which is
13 #error incompatible with your Protocol Buffer headers. Please update
16 #if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
17 #error This file was generated by an older version of protoc which is
18 #error incompatible with your Protocol Buffer headers. Please
19 #error regenerate this file with a newer version of protoc.
22 #include <google/protobuf/generated_message_util.h>
23 #include <google/protobuf/message.h>
24 #include <google/protobuf/repeated_field.h>
25 #include <google/protobuf/extension_set.h>
26 #include <google/protobuf/unknown_field_set.h>
32 void protobuf_AddDesc_cluster_2eproto();
33 void protobuf_AssignDesc_cluster_2eproto();
34 void protobuf_ShutdownFile_cluster_2eproto();
53 inline const ::google::protobuf::UnknownFieldSet& unknown_fields()
const {
54 return _unknown_fields_;
57 inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
58 return &_unknown_fields_;
61 static const ::google::protobuf::Descriptor* descriptor();
69 void CopyFrom(const ::google::protobuf::Message& from);
70 void MergeFrom(const ::google::protobuf::Message& from);
74 bool IsInitialized()
const;
77 bool MergePartialFromCodedStream(
78 ::google::protobuf::io::CodedInputStream* input);
79 void SerializeWithCachedSizes(
80 ::google::protobuf::io::CodedOutputStream* output)
const;
81 ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output)
const;
82 int GetCachedSize()
const {
return _cached_size_; }
86 void SetCachedSize(
int size)
const;
89 ::google::protobuf::Metadata GetMetadata()
const;
96 inline bool has_nworker_groups()
const;
97 inline void clear_nworker_groups();
98 static const int kNworkerGroupsFieldNumber = 1;
99 inline ::google::protobuf::int32 nworker_groups()
const;
100 inline void set_nworker_groups(::google::protobuf::int32 value);
103 inline bool has_nserver_groups()
const;
104 inline void clear_nserver_groups();
105 static const int kNserverGroupsFieldNumber = 2;
106 inline ::google::protobuf::int32 nserver_groups()
const;
107 inline void set_nserver_groups(::google::protobuf::int32 value);
110 inline bool has_nworkers_per_group()
const;
111 inline void clear_nworkers_per_group();
112 static const int kNworkersPerGroupFieldNumber = 3;
113 inline ::google::protobuf::int32 nworkers_per_group()
const;
114 inline void set_nworkers_per_group(::google::protobuf::int32 value);
117 inline bool has_nservers_per_group()
const;
118 inline void clear_nservers_per_group();
119 static const int kNserversPerGroupFieldNumber = 4;
120 inline ::google::protobuf::int32 nservers_per_group()
const;
121 inline void set_nservers_per_group(::google::protobuf::int32 value);
124 inline bool has_nworkers_per_procs()
const;
125 inline void clear_nworkers_per_procs();
126 static const int kNworkersPerProcsFieldNumber = 5;
127 inline ::google::protobuf::int32 nworkers_per_procs()
const;
128 inline void set_nworkers_per_procs(::google::protobuf::int32 value);
131 inline bool has_nservers_per_procs()
const;
132 inline void clear_nservers_per_procs();
133 static const int kNserversPerProcsFieldNumber = 6;
134 inline ::google::protobuf::int32 nservers_per_procs()
const;
135 inline void set_nservers_per_procs(::google::protobuf::int32 value);
138 inline bool has_hostfile()
const;
139 inline void clear_hostfile();
140 static const int kHostfileFieldNumber = 10;
141 inline const ::std::string& hostfile()
const;
142 inline void set_hostfile(const ::std::string& value);
143 inline void set_hostfile(
const char* value);
144 inline void set_hostfile(
const char* value,
size_t size);
145 inline ::std::string* mutable_hostfile();
146 inline ::std::string* release_hostfile();
147 inline void set_allocated_hostfile(::std::string* hostfile);
150 inline bool has_server_worker_separate()
const;
151 inline void clear_server_worker_separate();
152 static const int kServerWorkerSeparateFieldNumber = 11;
153 inline bool server_worker_separate()
const;
154 inline void set_server_worker_separate(
bool value);
157 inline bool has_nprocs()
const;
158 inline void clear_nprocs();
159 static const int kNprocsFieldNumber = 12;
160 inline ::google::protobuf::int32 nprocs()
const;
161 inline void set_nprocs(::google::protobuf::int32 value);
164 inline bool has_start_port()
const;
165 inline void clear_start_port();
166 static const int kStartPortFieldNumber = 13;
167 inline ::google::protobuf::int32 start_port()
const;
168 inline void set_start_port(::google::protobuf::int32 value);
171 inline bool has_workspace()
const;
172 inline void clear_workspace();
173 static const int kWorkspaceFieldNumber = 14;
174 inline const ::std::string& workspace()
const;
175 inline void set_workspace(const ::std::string& value);
176 inline void set_workspace(
const char* value);
177 inline void set_workspace(
const char* value,
size_t size);
178 inline ::std::string* mutable_workspace();
179 inline ::std::string* release_workspace();
180 inline void set_allocated_workspace(::std::string* workspace);
183 inline bool has_log_dir()
const;
184 inline void clear_log_dir();
185 static const int kLogDirFieldNumber = 15;
186 inline const ::std::string& log_dir()
const;
187 inline void set_log_dir(const ::std::string& value);
188 inline void set_log_dir(
const char* value);
189 inline void set_log_dir(
const char* value,
size_t size);
190 inline ::std::string* mutable_log_dir();
191 inline ::std::string* release_log_dir();
192 inline void set_allocated_log_dir(::std::string* log_dir);
195 inline bool has_zookeeper_host()
const;
196 inline void clear_zookeeper_host();
197 static const int kZookeeperHostFieldNumber = 16;
198 inline const ::std::string& zookeeper_host()
const;
199 inline void set_zookeeper_host(const ::std::string& value);
200 inline void set_zookeeper_host(
const char* value);
201 inline void set_zookeeper_host(
const char* value,
size_t size);
202 inline ::std::string* mutable_zookeeper_host();
203 inline ::std::string* release_zookeeper_host();
204 inline void set_allocated_zookeeper_host(::std::string* zookeeper_host);
207 inline int server_group_size()
const;
208 inline void clear_server_group();
209 static const int kServerGroupFieldNumber = 20;
210 inline const ::singa::ServerTopology& server_group(
int index)
const;
211 inline ::singa::ServerTopology* mutable_server_group(
int index);
212 inline ::singa::ServerTopology* add_server_group();
213 inline const ::google::protobuf::RepeatedPtrField< ::singa::ServerTopology >&
214 server_group()
const;
215 inline ::google::protobuf::RepeatedPtrField< ::singa::ServerTopology >*
216 mutable_server_group();
219 inline bool has_stub_timeout()
const;
220 inline void clear_stub_timeout();
221 static const int kStubTimeoutFieldNumber = 30;
222 inline ::google::protobuf::int32 stub_timeout()
const;
223 inline void set_stub_timeout(::google::protobuf::int32 value);
226 inline bool has_worker_timeout()
const;
227 inline void clear_worker_timeout();
228 static const int kWorkerTimeoutFieldNumber = 31;
229 inline ::google::protobuf::int32 worker_timeout()
const;
230 inline void set_worker_timeout(::google::protobuf::int32 value);
233 inline bool has_server_timeout()
const;
234 inline void clear_server_timeout();
235 static const int kServerTimeoutFieldNumber = 32;
236 inline ::google::protobuf::int32 server_timeout()
const;
237 inline void set_server_timeout(::google::protobuf::int32 value);
241 inline void set_has_nworker_groups();
242 inline void clear_has_nworker_groups();
243 inline void set_has_nserver_groups();
244 inline void clear_has_nserver_groups();
245 inline void set_has_nworkers_per_group();
246 inline void clear_has_nworkers_per_group();
247 inline void set_has_nservers_per_group();
248 inline void clear_has_nservers_per_group();
249 inline void set_has_nworkers_per_procs();
250 inline void clear_has_nworkers_per_procs();
251 inline void set_has_nservers_per_procs();
252 inline void clear_has_nservers_per_procs();
253 inline void set_has_hostfile();
254 inline void clear_has_hostfile();
255 inline void set_has_server_worker_separate();
256 inline void clear_has_server_worker_separate();
257 inline void set_has_nprocs();
258 inline void clear_has_nprocs();
259 inline void set_has_start_port();
260 inline void clear_has_start_port();
261 inline void set_has_workspace();
262 inline void clear_has_workspace();
263 inline void set_has_log_dir();
264 inline void clear_has_log_dir();
265 inline void set_has_zookeeper_host();
266 inline void clear_has_zookeeper_host();
267 inline void set_has_stub_timeout();
268 inline void clear_has_stub_timeout();
269 inline void set_has_worker_timeout();
270 inline void clear_has_worker_timeout();
271 inline void set_has_server_timeout();
272 inline void clear_has_server_timeout();
274 ::google::protobuf::UnknownFieldSet _unknown_fields_;
276 ::google::protobuf::int32 nworker_groups_;
277 ::google::protobuf::int32 nserver_groups_;
278 ::google::protobuf::int32 nworkers_per_group_;
279 ::google::protobuf::int32 nservers_per_group_;
280 ::google::protobuf::int32 nworkers_per_procs_;
281 ::google::protobuf::int32 nservers_per_procs_;
282 ::std::string* hostfile_;
283 bool server_worker_separate_;
284 ::google::protobuf::int32 nprocs_;
285 ::std::string* workspace_;
286 ::std::string* log_dir_;
287 ::google::protobuf::int32 start_port_;
288 ::google::protobuf::int32 stub_timeout_;
289 ::std::string* zookeeper_host_;
290 static ::std::string* _default_zookeeper_host_;
291 ::google::protobuf::RepeatedPtrField< ::singa::ServerTopology > server_group_;
292 ::google::protobuf::int32 worker_timeout_;
293 ::google::protobuf::int32 server_timeout_;
295 mutable int _cached_size_;
296 ::google::protobuf::uint32 _has_bits_[(17 + 31) / 32];
298 friend void protobuf_AddDesc_cluster_2eproto();
299 friend void protobuf_AssignDesc_cluster_2eproto();
300 friend void protobuf_ShutdownFile_cluster_2eproto();
302 void InitAsDefaultInstance();
319 inline const ::google::protobuf::UnknownFieldSet& unknown_fields()
const {
320 return _unknown_fields_;
323 inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
324 return &_unknown_fields_;
327 static const ::google::protobuf::Descriptor* descriptor();
335 void CopyFrom(const ::google::protobuf::Message& from);
336 void MergeFrom(const ::google::protobuf::Message& from);
340 bool IsInitialized()
const;
342 int ByteSize()
const;
343 bool MergePartialFromCodedStream(
344 ::google::protobuf::io::CodedInputStream* input);
345 void SerializeWithCachedSizes(
346 ::google::protobuf::io::CodedOutputStream* output)
const;
347 ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output)
const;
348 int GetCachedSize()
const {
return _cached_size_; }
352 void SetCachedSize(
int size)
const;
355 ::google::protobuf::Metadata GetMetadata()
const;
362 inline bool has_id()
const;
363 inline void clear_id();
364 static const int kIdFieldNumber = 1;
365 inline ::google::protobuf::int32 id()
const;
366 inline void set_id(::google::protobuf::int32 value);
369 inline bool has_sync_interval()
const;
370 inline void clear_sync_interval();
371 static const int kSyncIntervalFieldNumber = 2;
372 inline ::google::protobuf::int32 sync_interval()
const;
373 inline void set_sync_interval(::google::protobuf::int32 value);
376 inline int neighbor_size()
const;
377 inline void clear_neighbor();
378 static const int kNeighborFieldNumber = 3;
379 inline ::google::protobuf::int32 neighbor(
int index)
const;
380 inline void set_neighbor(
int index, ::google::protobuf::int32 value);
381 inline void add_neighbor(::google::protobuf::int32 value);
382 inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
384 inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
389 inline void set_has_id();
390 inline void clear_has_id();
391 inline void set_has_sync_interval();
392 inline void clear_has_sync_interval();
394 ::google::protobuf::UnknownFieldSet _unknown_fields_;
396 ::google::protobuf::int32 id_;
397 ::google::protobuf::int32 sync_interval_;
398 ::google::protobuf::RepeatedField< ::google::protobuf::int32 > neighbor_;
400 mutable int _cached_size_;
401 ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
403 friend void protobuf_AddDesc_cluster_2eproto();
404 friend void protobuf_AssignDesc_cluster_2eproto();
405 friend void protobuf_ShutdownFile_cluster_2eproto();
407 void InitAsDefaultInstance();
418 inline bool ClusterProto::has_nworker_groups()
const {
419 return (_has_bits_[0] & 0x00000001u) != 0;
421 inline void ClusterProto::set_has_nworker_groups() {
422 _has_bits_[0] |= 0x00000001u;
424 inline void ClusterProto::clear_has_nworker_groups() {
425 _has_bits_[0] &= ~0x00000001u;
427 inline void ClusterProto::clear_nworker_groups() {
429 clear_has_nworker_groups();
431 inline ::google::protobuf::int32 ClusterProto::nworker_groups()
const {
432 return nworker_groups_;
434 inline void ClusterProto::set_nworker_groups(::google::protobuf::int32 value) {
435 set_has_nworker_groups();
436 nworker_groups_ = value;
440 inline bool ClusterProto::has_nserver_groups()
const {
441 return (_has_bits_[0] & 0x00000002u) != 0;
443 inline void ClusterProto::set_has_nserver_groups() {
444 _has_bits_[0] |= 0x00000002u;
446 inline void ClusterProto::clear_has_nserver_groups() {
447 _has_bits_[0] &= ~0x00000002u;
449 inline void ClusterProto::clear_nserver_groups() {
451 clear_has_nserver_groups();
453 inline ::google::protobuf::int32 ClusterProto::nserver_groups()
const {
454 return nserver_groups_;
456 inline void ClusterProto::set_nserver_groups(::google::protobuf::int32 value) {
457 set_has_nserver_groups();
458 nserver_groups_ = value;
462 inline bool ClusterProto::has_nworkers_per_group()
const {
463 return (_has_bits_[0] & 0x00000004u) != 0;
465 inline void ClusterProto::set_has_nworkers_per_group() {
466 _has_bits_[0] |= 0x00000004u;
468 inline void ClusterProto::clear_has_nworkers_per_group() {
469 _has_bits_[0] &= ~0x00000004u;
471 inline void ClusterProto::clear_nworkers_per_group() {
472 nworkers_per_group_ = 1;
473 clear_has_nworkers_per_group();
475 inline ::google::protobuf::int32 ClusterProto::nworkers_per_group()
const {
476 return nworkers_per_group_;
478 inline void ClusterProto::set_nworkers_per_group(::google::protobuf::int32 value) {
479 set_has_nworkers_per_group();
480 nworkers_per_group_ = value;
484 inline bool ClusterProto::has_nservers_per_group()
const {
485 return (_has_bits_[0] & 0x00000008u) != 0;
487 inline void ClusterProto::set_has_nservers_per_group() {
488 _has_bits_[0] |= 0x00000008u;
490 inline void ClusterProto::clear_has_nservers_per_group() {
491 _has_bits_[0] &= ~0x00000008u;
493 inline void ClusterProto::clear_nservers_per_group() {
494 nservers_per_group_ = 1;
495 clear_has_nservers_per_group();
497 inline ::google::protobuf::int32 ClusterProto::nservers_per_group()
const {
498 return nservers_per_group_;
500 inline void ClusterProto::set_nservers_per_group(::google::protobuf::int32 value) {
501 set_has_nservers_per_group();
502 nservers_per_group_ = value;
506 inline bool ClusterProto::has_nworkers_per_procs()
const {
507 return (_has_bits_[0] & 0x00000010u) != 0;
509 inline void ClusterProto::set_has_nworkers_per_procs() {
510 _has_bits_[0] |= 0x00000010u;
512 inline void ClusterProto::clear_has_nworkers_per_procs() {
513 _has_bits_[0] &= ~0x00000010u;
515 inline void ClusterProto::clear_nworkers_per_procs() {
516 nworkers_per_procs_ = 1;
517 clear_has_nworkers_per_procs();
519 inline ::google::protobuf::int32 ClusterProto::nworkers_per_procs()
const {
520 return nworkers_per_procs_;
522 inline void ClusterProto::set_nworkers_per_procs(::google::protobuf::int32 value) {
523 set_has_nworkers_per_procs();
524 nworkers_per_procs_ = value;
528 inline bool ClusterProto::has_nservers_per_procs()
const {
529 return (_has_bits_[0] & 0x00000020u) != 0;
531 inline void ClusterProto::set_has_nservers_per_procs() {
532 _has_bits_[0] |= 0x00000020u;
534 inline void ClusterProto::clear_has_nservers_per_procs() {
535 _has_bits_[0] &= ~0x00000020u;
537 inline void ClusterProto::clear_nservers_per_procs() {
538 nservers_per_procs_ = 1;
539 clear_has_nservers_per_procs();
541 inline ::google::protobuf::int32 ClusterProto::nservers_per_procs()
const {
542 return nservers_per_procs_;
544 inline void ClusterProto::set_nservers_per_procs(::google::protobuf::int32 value) {
545 set_has_nservers_per_procs();
546 nservers_per_procs_ = value;
550 inline bool ClusterProto::has_hostfile()
const {
551 return (_has_bits_[0] & 0x00000040u) != 0;
553 inline void ClusterProto::set_has_hostfile() {
554 _has_bits_[0] |= 0x00000040u;
556 inline void ClusterProto::clear_has_hostfile() {
557 _has_bits_[0] &= ~0x00000040u;
559 inline void ClusterProto::clear_hostfile() {
560 if (hostfile_ != &::google::protobuf::internal::kEmptyString) {
563 clear_has_hostfile();
565 inline const ::std::string& ClusterProto::hostfile()
const {
568 inline void ClusterProto::set_hostfile(const ::std::string& value) {
570 if (hostfile_ == &::google::protobuf::internal::kEmptyString) {
571 hostfile_ = new ::std::string;
573 hostfile_->assign(value);
575 inline void ClusterProto::set_hostfile(
const char* value) {
577 if (hostfile_ == &::google::protobuf::internal::kEmptyString) {
578 hostfile_ = new ::std::string;
580 hostfile_->assign(value);
582 inline void ClusterProto::set_hostfile(
const char* value,
size_t size) {
584 if (hostfile_ == &::google::protobuf::internal::kEmptyString) {
585 hostfile_ = new ::std::string;
587 hostfile_->assign(reinterpret_cast<const char*>(value), size);
589 inline ::std::string* ClusterProto::mutable_hostfile() {
591 if (hostfile_ == &::google::protobuf::internal::kEmptyString) {
592 hostfile_ = new ::std::string;
596 inline ::std::string* ClusterProto::release_hostfile() {
597 clear_has_hostfile();
598 if (hostfile_ == &::google::protobuf::internal::kEmptyString) {
601 ::std::string* temp = hostfile_;
602 hostfile_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::kEmptyString);
606 inline void ClusterProto::set_allocated_hostfile(::std::string* hostfile) {
607 if (hostfile_ != &::google::protobuf::internal::kEmptyString) {
612 hostfile_ = hostfile;
614 clear_has_hostfile();
615 hostfile_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::kEmptyString);
620 inline bool ClusterProto::has_server_worker_separate()
const {
621 return (_has_bits_[0] & 0x00000080u) != 0;
623 inline void ClusterProto::set_has_server_worker_separate() {
624 _has_bits_[0] |= 0x00000080u;
626 inline void ClusterProto::clear_has_server_worker_separate() {
627 _has_bits_[0] &= ~0x00000080u;
629 inline void ClusterProto::clear_server_worker_separate() {
630 server_worker_separate_ =
false;
631 clear_has_server_worker_separate();
633 inline bool ClusterProto::server_worker_separate()
const {
634 return server_worker_separate_;
636 inline void ClusterProto::set_server_worker_separate(
bool value) {
637 set_has_server_worker_separate();
638 server_worker_separate_ = value;
642 inline bool ClusterProto::has_nprocs()
const {
643 return (_has_bits_[0] & 0x00000100u) != 0;
645 inline void ClusterProto::set_has_nprocs() {
646 _has_bits_[0] |= 0x00000100u;
648 inline void ClusterProto::clear_has_nprocs() {
649 _has_bits_[0] &= ~0x00000100u;
651 inline void ClusterProto::clear_nprocs() {
655 inline ::google::protobuf::int32 ClusterProto::nprocs()
const {
658 inline void ClusterProto::set_nprocs(::google::protobuf::int32 value) {
664 inline bool ClusterProto::has_start_port()
const {
665 return (_has_bits_[0] & 0x00000200u) != 0;
667 inline void ClusterProto::set_has_start_port() {
668 _has_bits_[0] |= 0x00000200u;
670 inline void ClusterProto::clear_has_start_port() {
671 _has_bits_[0] &= ~0x00000200u;
673 inline void ClusterProto::clear_start_port() {
675 clear_has_start_port();
677 inline ::google::protobuf::int32 ClusterProto::start_port()
const {
680 inline void ClusterProto::set_start_port(::google::protobuf::int32 value) {
681 set_has_start_port();
686 inline bool ClusterProto::has_workspace()
const {
687 return (_has_bits_[0] & 0x00000400u) != 0;
689 inline void ClusterProto::set_has_workspace() {
690 _has_bits_[0] |= 0x00000400u;
692 inline void ClusterProto::clear_has_workspace() {
693 _has_bits_[0] &= ~0x00000400u;
695 inline void ClusterProto::clear_workspace() {
696 if (workspace_ != &::google::protobuf::internal::kEmptyString) {
699 clear_has_workspace();
701 inline const ::std::string& ClusterProto::workspace()
const {
704 inline void ClusterProto::set_workspace(const ::std::string& value) {
706 if (workspace_ == &::google::protobuf::internal::kEmptyString) {
707 workspace_ = new ::std::string;
709 workspace_->assign(value);
711 inline void ClusterProto::set_workspace(
const char* value) {
713 if (workspace_ == &::google::protobuf::internal::kEmptyString) {
714 workspace_ = new ::std::string;
716 workspace_->assign(value);
718 inline void ClusterProto::set_workspace(
const char* value,
size_t size) {
720 if (workspace_ == &::google::protobuf::internal::kEmptyString) {
721 workspace_ = new ::std::string;
723 workspace_->assign(reinterpret_cast<const char*>(value), size);
725 inline ::std::string* ClusterProto::mutable_workspace() {
727 if (workspace_ == &::google::protobuf::internal::kEmptyString) {
728 workspace_ = new ::std::string;
732 inline ::std::string* ClusterProto::release_workspace() {
733 clear_has_workspace();
734 if (workspace_ == &::google::protobuf::internal::kEmptyString) {
737 ::std::string* temp = workspace_;
738 workspace_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::kEmptyString);
742 inline void ClusterProto::set_allocated_workspace(::std::string* workspace) {
743 if (workspace_ != &::google::protobuf::internal::kEmptyString) {
748 workspace_ = workspace;
750 clear_has_workspace();
751 workspace_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::kEmptyString);
756 inline bool ClusterProto::has_log_dir()
const {
757 return (_has_bits_[0] & 0x00000800u) != 0;
759 inline void ClusterProto::set_has_log_dir() {
760 _has_bits_[0] |= 0x00000800u;
762 inline void ClusterProto::clear_has_log_dir() {
763 _has_bits_[0] &= ~0x00000800u;
765 inline void ClusterProto::clear_log_dir() {
766 if (log_dir_ != &::google::protobuf::internal::kEmptyString) {
771 inline const ::std::string& ClusterProto::log_dir()
const {
774 inline void ClusterProto::set_log_dir(const ::std::string& value) {
776 if (log_dir_ == &::google::protobuf::internal::kEmptyString) {
777 log_dir_ = new ::std::string;
779 log_dir_->assign(value);
781 inline void ClusterProto::set_log_dir(
const char* value) {
783 if (log_dir_ == &::google::protobuf::internal::kEmptyString) {
784 log_dir_ = new ::std::string;
786 log_dir_->assign(value);
788 inline void ClusterProto::set_log_dir(
const char* value,
size_t size) {
790 if (log_dir_ == &::google::protobuf::internal::kEmptyString) {
791 log_dir_ = new ::std::string;
793 log_dir_->assign(reinterpret_cast<const char*>(value), size);
795 inline ::std::string* ClusterProto::mutable_log_dir() {
797 if (log_dir_ == &::google::protobuf::internal::kEmptyString) {
798 log_dir_ = new ::std::string;
802 inline ::std::string* ClusterProto::release_log_dir() {
804 if (log_dir_ == &::google::protobuf::internal::kEmptyString) {
807 ::std::string* temp = log_dir_;
808 log_dir_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::kEmptyString);
812 inline void ClusterProto::set_allocated_log_dir(::std::string* log_dir) {
813 if (log_dir_ != &::google::protobuf::internal::kEmptyString) {
821 log_dir_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::kEmptyString);
826 inline bool ClusterProto::has_zookeeper_host()
const {
827 return (_has_bits_[0] & 0x00001000u) != 0;
829 inline void ClusterProto::set_has_zookeeper_host() {
830 _has_bits_[0] |= 0x00001000u;
832 inline void ClusterProto::clear_has_zookeeper_host() {
833 _has_bits_[0] &= ~0x00001000u;
835 inline void ClusterProto::clear_zookeeper_host() {
836 if (zookeeper_host_ != _default_zookeeper_host_) {
837 zookeeper_host_->assign(*_default_zookeeper_host_);
839 clear_has_zookeeper_host();
841 inline const ::std::string& ClusterProto::zookeeper_host()
const {
842 return *zookeeper_host_;
844 inline void ClusterProto::set_zookeeper_host(const ::std::string& value) {
845 set_has_zookeeper_host();
846 if (zookeeper_host_ == _default_zookeeper_host_) {
847 zookeeper_host_ = new ::std::string;
849 zookeeper_host_->assign(value);
851 inline void ClusterProto::set_zookeeper_host(
const char* value) {
852 set_has_zookeeper_host();
853 if (zookeeper_host_ == _default_zookeeper_host_) {
854 zookeeper_host_ = new ::std::string;
856 zookeeper_host_->assign(value);
858 inline void ClusterProto::set_zookeeper_host(
const char* value,
size_t size) {
859 set_has_zookeeper_host();
860 if (zookeeper_host_ == _default_zookeeper_host_) {
861 zookeeper_host_ = new ::std::string;
863 zookeeper_host_->assign(reinterpret_cast<const char*>(value), size);
865 inline ::std::string* ClusterProto::mutable_zookeeper_host() {
866 set_has_zookeeper_host();
867 if (zookeeper_host_ == _default_zookeeper_host_) {
868 zookeeper_host_ = new ::std::string(*_default_zookeeper_host_);
870 return zookeeper_host_;
872 inline ::std::string* ClusterProto::release_zookeeper_host() {
873 clear_has_zookeeper_host();
874 if (zookeeper_host_ == _default_zookeeper_host_) {
877 ::std::string* temp = zookeeper_host_;
878 zookeeper_host_ =
const_cast< ::std::string*
>(_default_zookeeper_host_);
882 inline void ClusterProto::set_allocated_zookeeper_host(::std::string* zookeeper_host) {
883 if (zookeeper_host_ != _default_zookeeper_host_) {
884 delete zookeeper_host_;
886 if (zookeeper_host) {
887 set_has_zookeeper_host();
888 zookeeper_host_ = zookeeper_host;
890 clear_has_zookeeper_host();
891 zookeeper_host_ =
const_cast< ::std::string*
>(_default_zookeeper_host_);
896 inline int ClusterProto::server_group_size()
const {
897 return server_group_.size();
899 inline void ClusterProto::clear_server_group() {
900 server_group_.Clear();
902 inline const ::singa::ServerTopology& ClusterProto::server_group(
int index)
const {
903 return server_group_.Get(index);
905 inline ::singa::ServerTopology* ClusterProto::mutable_server_group(
int index) {
906 return server_group_.Mutable(index);
908 inline ::singa::ServerTopology* ClusterProto::add_server_group() {
909 return server_group_.Add();
911 inline const ::google::protobuf::RepeatedPtrField< ::singa::ServerTopology >&
912 ClusterProto::server_group()
const {
913 return server_group_;
915 inline ::google::protobuf::RepeatedPtrField< ::singa::ServerTopology >*
916 ClusterProto::mutable_server_group() {
917 return &server_group_;
921 inline bool ClusterProto::has_stub_timeout()
const {
922 return (_has_bits_[0] & 0x00004000u) != 0;
924 inline void ClusterProto::set_has_stub_timeout() {
925 _has_bits_[0] |= 0x00004000u;
927 inline void ClusterProto::clear_has_stub_timeout() {
928 _has_bits_[0] &= ~0x00004000u;
930 inline void ClusterProto::clear_stub_timeout() {
931 stub_timeout_ = 5000;
932 clear_has_stub_timeout();
934 inline ::google::protobuf::int32 ClusterProto::stub_timeout()
const {
935 return stub_timeout_;
937 inline void ClusterProto::set_stub_timeout(::google::protobuf::int32 value) {
938 set_has_stub_timeout();
939 stub_timeout_ = value;
943 inline bool ClusterProto::has_worker_timeout()
const {
944 return (_has_bits_[0] & 0x00008000u) != 0;
946 inline void ClusterProto::set_has_worker_timeout() {
947 _has_bits_[0] |= 0x00008000u;
949 inline void ClusterProto::clear_has_worker_timeout() {
950 _has_bits_[0] &= ~0x00008000u;
952 inline void ClusterProto::clear_worker_timeout() {
953 worker_timeout_ = 5000;
954 clear_has_worker_timeout();
956 inline ::google::protobuf::int32 ClusterProto::worker_timeout()
const {
957 return worker_timeout_;
959 inline void ClusterProto::set_worker_timeout(::google::protobuf::int32 value) {
960 set_has_worker_timeout();
961 worker_timeout_ = value;
965 inline bool ClusterProto::has_server_timeout()
const {
966 return (_has_bits_[0] & 0x00010000u) != 0;
968 inline void ClusterProto::set_has_server_timeout() {
969 _has_bits_[0] |= 0x00010000u;
971 inline void ClusterProto::clear_has_server_timeout() {
972 _has_bits_[0] &= ~0x00010000u;
974 inline void ClusterProto::clear_server_timeout() {
975 server_timeout_ = 5000;
976 clear_has_server_timeout();
978 inline ::google::protobuf::int32 ClusterProto::server_timeout()
const {
979 return server_timeout_;
981 inline void ClusterProto::set_server_timeout(::google::protobuf::int32 value) {
982 set_has_server_timeout();
983 server_timeout_ = value;
991 inline bool ServerTopology::has_id()
const {
992 return (_has_bits_[0] & 0x00000001u) != 0;
994 inline void ServerTopology::set_has_id() {
995 _has_bits_[0] |= 0x00000001u;
997 inline void ServerTopology::clear_has_id() {
998 _has_bits_[0] &= ~0x00000001u;
1000 inline void ServerTopology::clear_id() {
1004 inline ::google::protobuf::int32 ServerTopology::id()
const {
1007 inline void ServerTopology::set_id(::google::protobuf::int32 value) {
1013 inline bool ServerTopology::has_sync_interval()
const {
1014 return (_has_bits_[0] & 0x00000002u) != 0;
1016 inline void ServerTopology::set_has_sync_interval() {
1017 _has_bits_[0] |= 0x00000002u;
1019 inline void ServerTopology::clear_has_sync_interval() {
1020 _has_bits_[0] &= ~0x00000002u;
1022 inline void ServerTopology::clear_sync_interval() {
1024 clear_has_sync_interval();
1026 inline ::google::protobuf::int32 ServerTopology::sync_interval()
const {
1027 return sync_interval_;
1029 inline void ServerTopology::set_sync_interval(::google::protobuf::int32 value) {
1030 set_has_sync_interval();
1031 sync_interval_ = value;
1035 inline int ServerTopology::neighbor_size()
const {
1036 return neighbor_.size();
1038 inline void ServerTopology::clear_neighbor() {
1041 inline ::google::protobuf::int32 ServerTopology::neighbor(
int index)
const {
1042 return neighbor_.Get(index);
1044 inline void ServerTopology::set_neighbor(
int index, ::google::protobuf::int32 value) {
1045 neighbor_.Set(index, value);
1047 inline void ServerTopology::add_neighbor(::google::protobuf::int32 value) {
1048 neighbor_.Add(value);
1050 inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
1051 ServerTopology::neighbor()
const {
1054 inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
1055 ServerTopology::mutable_neighbor() {
1066 namespace protobuf {
1075 #endif // PROTOBUF_cluster_2eproto__INCLUDED
Definition: cluster.pb.h:41
Definition: cluster.pb.h:307