GPUdb C++ API  Version 7.2.2.4
admin_switchover.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __ADMIN_SWITCHOVER_H__
7 #define __ADMIN_SWITCHOVER_H__
8 
9 namespace gpudb
10 {
20  {
25  processes(std::vector<std::string>()),
26  destinations(std::vector<std::string>()),
27  options(std::map<std::string, std::string>())
28  {
29  }
30 
81  AdminSwitchoverRequest(const std::vector<std::string>& processes_, const std::vector<std::string>& destinations_, const std::map<std::string, std::string>& options_):
82  processes( processes_ ),
83  destinations( destinations_ ),
84  options( options_ )
85  {
86  }
87 
99  std::vector<std::string> processes;
100 
110  std::vector<std::string> destinations;
111 
131  std::map<std::string, std::string> options;
132  };
133 } // end namespace gpudb
134 
135 namespace avro
136 {
137  template<> struct codec_traits<gpudb::AdminSwitchoverRequest>
138  {
139  static void encode(Encoder& e, const gpudb::AdminSwitchoverRequest& v)
140  {
141  ::avro::encode(e, v.processes);
142  ::avro::encode(e, v.destinations);
143  ::avro::encode(e, v.options);
144  }
145 
146  static void decode(Decoder& d, gpudb::AdminSwitchoverRequest& v)
147  {
148  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
149  {
150  const std::vector<size_t> fo = rd->fieldOrder();
151 
152  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
153  {
154  switch (*it)
155  {
156  case 0:
157  ::avro::decode(d, v.processes);
158  break;
159 
160  case 1:
161  ::avro::decode(d, v.destinations);
162  break;
163 
164  case 2:
165  ::avro::decode(d, v.options);
166  break;
167 
168  default:
169  break;
170  }
171  }
172  }
173  else
174  {
175  ::avro::decode(d, v.processes);
176  ::avro::decode(d, v.destinations);
177  ::avro::decode(d, v.options);
178  }
179  }
180  };
181 } // end namespace avro
182 
183 namespace gpudb
184 {
191  {
197  info(std::map<std::string, std::string>())
198  {
199  }
200 
204  std::map<std::string, std::string> info;
205  };
206 } // end namespace gpudb
207 
208 namespace avro
209 {
210  template<> struct codec_traits<gpudb::AdminSwitchoverResponse>
211  {
212  static void encode(Encoder& e, const gpudb::AdminSwitchoverResponse& v)
213  {
214  ::avro::encode(e, v.info);
215  }
216 
217  static void decode(Decoder& d, gpudb::AdminSwitchoverResponse& v)
218  {
219  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
220  {
221  const std::vector<size_t> fo = rd->fieldOrder();
222 
223  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
224  {
225  switch (*it)
226  {
227  case 0:
228  ::avro::decode(d, v.info);
229  break;
230 
231  default:
232  break;
233  }
234  }
235  }
236  else
237  {
238  ::avro::decode(d, v.info);
239  }
240  }
241  };
242 } // end namespace avro
243 
244 #endif // __ADMIN_SWITCHOVER_H__
AdminSwitchoverRequest()
Constructs an AdminSwitchoverRequest object with default parameters.
AdminSwitchoverResponse()
Constructs an AdminSwitchoverResponse object with default parameters.
AdminSwitchoverRequest(const std::vector< std::string > &processes_, const std::vector< std::string > &destinations_, const std::map< std::string, std::string > &options_)
Constructs an AdminSwitchoverRequest object with the specified parameters.
std::map< std::string, std::string > options
Optional parameters.
std::vector< std::string > processes
Indicates the process identifier to switch over to another host.
A set of results returned by GPUdb::adminSwitchover.
std::vector< std::string > destinations
Indicates to which host to switch over each corresponding process given in processes.
A set of parameters for GPUdb::adminSwitchover.
std::map< std::string, std::string > info
Additional information.