FacebookService.py 56 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834
  1. #
  2. # Autogenerated by Thrift
  3. #
  4. # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  5. #
  6. from thrift.Thrift import *
  7. from ttypes import *
  8. from thrift.Thrift import TProcessor
  9. from thrift.transport import TTransport
  10. from thrift.protocol import TBinaryProtocol
  11. try:
  12. from thrift.protocol import fastbinary
  13. except:
  14. fastbinary = None
  15. class Iface:
  16. """
  17. Standard base service
  18. """
  19. def getName(self, ):
  20. """
  21. Returns a descriptive name of the service
  22. """
  23. pass
  24. def getVersion(self, ):
  25. """
  26. Returns the version of the service
  27. """
  28. pass
  29. def getStatus(self, ):
  30. """
  31. Gets the status of this service
  32. """
  33. pass
  34. def getStatusDetails(self, ):
  35. """
  36. User friendly description of status, such as why the service is in
  37. the dead or warning state, or what is being started or stopped.
  38. """
  39. pass
  40. def getCounters(self, ):
  41. """
  42. Gets the counters for this service
  43. """
  44. pass
  45. def getCounter(self, key):
  46. """
  47. Gets the value of a single counter
  48. Parameters:
  49. - key
  50. """
  51. pass
  52. def setOption(self, key, value):
  53. """
  54. Sets an option
  55. Parameters:
  56. - key
  57. - value
  58. """
  59. pass
  60. def getOption(self, key):
  61. """
  62. Gets an option
  63. Parameters:
  64. - key
  65. """
  66. pass
  67. def getOptions(self, ):
  68. """
  69. Gets all options
  70. """
  71. pass
  72. def getCpuProfile(self, profileDurationInSec):
  73. """
  74. Returns a CPU profile over the given time interval (client and server
  75. must agree on the profile format).
  76. Parameters:
  77. - profileDurationInSec
  78. """
  79. pass
  80. def aliveSince(self, ):
  81. """
  82. Returns the unix time that the server has been running since
  83. """
  84. pass
  85. def reinitialize(self, ):
  86. """
  87. Tell the server to reload its configuration, reopen log files, etc
  88. """
  89. pass
  90. def shutdown(self, ):
  91. """
  92. Suggest a shutdown to the server
  93. """
  94. pass
  95. class Client(Iface):
  96. """
  97. Standard base service
  98. """
  99. def __init__(self, iprot, oprot=None):
  100. self._iprot = self._oprot = iprot
  101. if oprot != None:
  102. self._oprot = oprot
  103. self._seqid = 0
  104. def getName(self, ):
  105. """
  106. Returns a descriptive name of the service
  107. """
  108. self.send_getName()
  109. return self.recv_getName()
  110. def send_getName(self, ):
  111. self._oprot.writeMessageBegin('getName', TMessageType.CALL, self._seqid)
  112. args = getName_args()
  113. args.write(self._oprot)
  114. self._oprot.writeMessageEnd()
  115. self._oprot.trans.flush()
  116. def recv_getName(self, ):
  117. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  118. if mtype == TMessageType.EXCEPTION:
  119. x = TApplicationException()
  120. x.read(self._iprot)
  121. self._iprot.readMessageEnd()
  122. raise x
  123. result = getName_result()
  124. result.read(self._iprot)
  125. self._iprot.readMessageEnd()
  126. if result.success != None:
  127. return result.success
  128. raise TApplicationException(TApplicationException.MISSING_RESULT, "getName failed: unknown result");
  129. def getVersion(self, ):
  130. """
  131. Returns the version of the service
  132. """
  133. self.send_getVersion()
  134. return self.recv_getVersion()
  135. def send_getVersion(self, ):
  136. self._oprot.writeMessageBegin('getVersion', TMessageType.CALL, self._seqid)
  137. args = getVersion_args()
  138. args.write(self._oprot)
  139. self._oprot.writeMessageEnd()
  140. self._oprot.trans.flush()
  141. def recv_getVersion(self, ):
  142. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  143. if mtype == TMessageType.EXCEPTION:
  144. x = TApplicationException()
  145. x.read(self._iprot)
  146. self._iprot.readMessageEnd()
  147. raise x
  148. result = getVersion_result()
  149. result.read(self._iprot)
  150. self._iprot.readMessageEnd()
  151. if result.success != None:
  152. return result.success
  153. raise TApplicationException(TApplicationException.MISSING_RESULT, "getVersion failed: unknown result");
  154. def getStatus(self, ):
  155. """
  156. Gets the status of this service
  157. """
  158. self.send_getStatus()
  159. return self.recv_getStatus()
  160. def send_getStatus(self, ):
  161. self._oprot.writeMessageBegin('getStatus', TMessageType.CALL, self._seqid)
  162. args = getStatus_args()
  163. args.write(self._oprot)
  164. self._oprot.writeMessageEnd()
  165. self._oprot.trans.flush()
  166. def recv_getStatus(self, ):
  167. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  168. if mtype == TMessageType.EXCEPTION:
  169. x = TApplicationException()
  170. x.read(self._iprot)
  171. self._iprot.readMessageEnd()
  172. raise x
  173. result = getStatus_result()
  174. result.read(self._iprot)
  175. self._iprot.readMessageEnd()
  176. if result.success != None:
  177. return result.success
  178. raise TApplicationException(TApplicationException.MISSING_RESULT, "getStatus failed: unknown result");
  179. def getStatusDetails(self, ):
  180. """
  181. User friendly description of status, such as why the service is in
  182. the dead or warning state, or what is being started or stopped.
  183. """
  184. self.send_getStatusDetails()
  185. return self.recv_getStatusDetails()
  186. def send_getStatusDetails(self, ):
  187. self._oprot.writeMessageBegin('getStatusDetails', TMessageType.CALL, self._seqid)
  188. args = getStatusDetails_args()
  189. args.write(self._oprot)
  190. self._oprot.writeMessageEnd()
  191. self._oprot.trans.flush()
  192. def recv_getStatusDetails(self, ):
  193. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  194. if mtype == TMessageType.EXCEPTION:
  195. x = TApplicationException()
  196. x.read(self._iprot)
  197. self._iprot.readMessageEnd()
  198. raise x
  199. result = getStatusDetails_result()
  200. result.read(self._iprot)
  201. self._iprot.readMessageEnd()
  202. if result.success != None:
  203. return result.success
  204. raise TApplicationException(TApplicationException.MISSING_RESULT, "getStatusDetails failed: unknown result");
  205. def getCounters(self, ):
  206. """
  207. Gets the counters for this service
  208. """
  209. self.send_getCounters()
  210. return self.recv_getCounters()
  211. def send_getCounters(self, ):
  212. self._oprot.writeMessageBegin('getCounters', TMessageType.CALL, self._seqid)
  213. args = getCounters_args()
  214. args.write(self._oprot)
  215. self._oprot.writeMessageEnd()
  216. self._oprot.trans.flush()
  217. def recv_getCounters(self, ):
  218. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  219. if mtype == TMessageType.EXCEPTION:
  220. x = TApplicationException()
  221. x.read(self._iprot)
  222. self._iprot.readMessageEnd()
  223. raise x
  224. result = getCounters_result()
  225. result.read(self._iprot)
  226. self._iprot.readMessageEnd()
  227. if result.success != None:
  228. return result.success
  229. raise TApplicationException(TApplicationException.MISSING_RESULT, "getCounters failed: unknown result");
  230. def getCounter(self, key):
  231. """
  232. Gets the value of a single counter
  233. Parameters:
  234. - key
  235. """
  236. self.send_getCounter(key)
  237. return self.recv_getCounter()
  238. def send_getCounter(self, key):
  239. self._oprot.writeMessageBegin('getCounter', TMessageType.CALL, self._seqid)
  240. args = getCounter_args()
  241. args.key = key
  242. args.write(self._oprot)
  243. self._oprot.writeMessageEnd()
  244. self._oprot.trans.flush()
  245. def recv_getCounter(self, ):
  246. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  247. if mtype == TMessageType.EXCEPTION:
  248. x = TApplicationException()
  249. x.read(self._iprot)
  250. self._iprot.readMessageEnd()
  251. raise x
  252. result = getCounter_result()
  253. result.read(self._iprot)
  254. self._iprot.readMessageEnd()
  255. if result.success != None:
  256. return result.success
  257. raise TApplicationException(TApplicationException.MISSING_RESULT, "getCounter failed: unknown result");
  258. def setOption(self, key, value):
  259. """
  260. Sets an option
  261. Parameters:
  262. - key
  263. - value
  264. """
  265. self.send_setOption(key, value)
  266. self.recv_setOption()
  267. def send_setOption(self, key, value):
  268. self._oprot.writeMessageBegin('setOption', TMessageType.CALL, self._seqid)
  269. args = setOption_args()
  270. args.key = key
  271. args.value = value
  272. args.write(self._oprot)
  273. self._oprot.writeMessageEnd()
  274. self._oprot.trans.flush()
  275. def recv_setOption(self, ):
  276. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  277. if mtype == TMessageType.EXCEPTION:
  278. x = TApplicationException()
  279. x.read(self._iprot)
  280. self._iprot.readMessageEnd()
  281. raise x
  282. result = setOption_result()
  283. result.read(self._iprot)
  284. self._iprot.readMessageEnd()
  285. return
  286. def getOption(self, key):
  287. """
  288. Gets an option
  289. Parameters:
  290. - key
  291. """
  292. self.send_getOption(key)
  293. return self.recv_getOption()
  294. def send_getOption(self, key):
  295. self._oprot.writeMessageBegin('getOption', TMessageType.CALL, self._seqid)
  296. args = getOption_args()
  297. args.key = key
  298. args.write(self._oprot)
  299. self._oprot.writeMessageEnd()
  300. self._oprot.trans.flush()
  301. def recv_getOption(self, ):
  302. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  303. if mtype == TMessageType.EXCEPTION:
  304. x = TApplicationException()
  305. x.read(self._iprot)
  306. self._iprot.readMessageEnd()
  307. raise x
  308. result = getOption_result()
  309. result.read(self._iprot)
  310. self._iprot.readMessageEnd()
  311. if result.success != None:
  312. return result.success
  313. raise TApplicationException(TApplicationException.MISSING_RESULT, "getOption failed: unknown result");
  314. def getOptions(self, ):
  315. """
  316. Gets all options
  317. """
  318. self.send_getOptions()
  319. return self.recv_getOptions()
  320. def send_getOptions(self, ):
  321. self._oprot.writeMessageBegin('getOptions', TMessageType.CALL, self._seqid)
  322. args = getOptions_args()
  323. args.write(self._oprot)
  324. self._oprot.writeMessageEnd()
  325. self._oprot.trans.flush()
  326. def recv_getOptions(self, ):
  327. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  328. if mtype == TMessageType.EXCEPTION:
  329. x = TApplicationException()
  330. x.read(self._iprot)
  331. self._iprot.readMessageEnd()
  332. raise x
  333. result = getOptions_result()
  334. result.read(self._iprot)
  335. self._iprot.readMessageEnd()
  336. if result.success != None:
  337. return result.success
  338. raise TApplicationException(TApplicationException.MISSING_RESULT, "getOptions failed: unknown result");
  339. def getCpuProfile(self, profileDurationInSec):
  340. """
  341. Returns a CPU profile over the given time interval (client and server
  342. must agree on the profile format).
  343. Parameters:
  344. - profileDurationInSec
  345. """
  346. self.send_getCpuProfile(profileDurationInSec)
  347. return self.recv_getCpuProfile()
  348. def send_getCpuProfile(self, profileDurationInSec):
  349. self._oprot.writeMessageBegin('getCpuProfile', TMessageType.CALL, self._seqid)
  350. args = getCpuProfile_args()
  351. args.profileDurationInSec = profileDurationInSec
  352. args.write(self._oprot)
  353. self._oprot.writeMessageEnd()
  354. self._oprot.trans.flush()
  355. def recv_getCpuProfile(self, ):
  356. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  357. if mtype == TMessageType.EXCEPTION:
  358. x = TApplicationException()
  359. x.read(self._iprot)
  360. self._iprot.readMessageEnd()
  361. raise x
  362. result = getCpuProfile_result()
  363. result.read(self._iprot)
  364. self._iprot.readMessageEnd()
  365. if result.success != None:
  366. return result.success
  367. raise TApplicationException(TApplicationException.MISSING_RESULT, "getCpuProfile failed: unknown result");
  368. def aliveSince(self, ):
  369. """
  370. Returns the unix time that the server has been running since
  371. """
  372. self.send_aliveSince()
  373. return self.recv_aliveSince()
  374. def send_aliveSince(self, ):
  375. self._oprot.writeMessageBegin('aliveSince', TMessageType.CALL, self._seqid)
  376. args = aliveSince_args()
  377. args.write(self._oprot)
  378. self._oprot.writeMessageEnd()
  379. self._oprot.trans.flush()
  380. def recv_aliveSince(self, ):
  381. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  382. if mtype == TMessageType.EXCEPTION:
  383. x = TApplicationException()
  384. x.read(self._iprot)
  385. self._iprot.readMessageEnd()
  386. raise x
  387. result = aliveSince_result()
  388. result.read(self._iprot)
  389. self._iprot.readMessageEnd()
  390. if result.success != None:
  391. return result.success
  392. raise TApplicationException(TApplicationException.MISSING_RESULT, "aliveSince failed: unknown result");
  393. def reinitialize(self, ):
  394. """
  395. Tell the server to reload its configuration, reopen log files, etc
  396. """
  397. self.send_reinitialize()
  398. def send_reinitialize(self, ):
  399. self._oprot.writeMessageBegin('reinitialize', TMessageType.CALL, self._seqid)
  400. args = reinitialize_args()
  401. args.write(self._oprot)
  402. self._oprot.writeMessageEnd()
  403. self._oprot.trans.flush()
  404. def shutdown(self, ):
  405. """
  406. Suggest a shutdown to the server
  407. """
  408. self.send_shutdown()
  409. def send_shutdown(self, ):
  410. self._oprot.writeMessageBegin('shutdown', TMessageType.CALL, self._seqid)
  411. args = shutdown_args()
  412. args.write(self._oprot)
  413. self._oprot.writeMessageEnd()
  414. self._oprot.trans.flush()
  415. class Processor(Iface, TProcessor):
  416. def __init__(self, handler):
  417. self._handler = handler
  418. self._processMap = {}
  419. self._processMap["getName"] = Processor.process_getName
  420. self._processMap["getVersion"] = Processor.process_getVersion
  421. self._processMap["getStatus"] = Processor.process_getStatus
  422. self._processMap["getStatusDetails"] = Processor.process_getStatusDetails
  423. self._processMap["getCounters"] = Processor.process_getCounters
  424. self._processMap["getCounter"] = Processor.process_getCounter
  425. self._processMap["setOption"] = Processor.process_setOption
  426. self._processMap["getOption"] = Processor.process_getOption
  427. self._processMap["getOptions"] = Processor.process_getOptions
  428. self._processMap["getCpuProfile"] = Processor.process_getCpuProfile
  429. self._processMap["aliveSince"] = Processor.process_aliveSince
  430. self._processMap["reinitialize"] = Processor.process_reinitialize
  431. self._processMap["shutdown"] = Processor.process_shutdown
  432. def process(self, iprot, oprot):
  433. (name, type, seqid) = iprot.readMessageBegin()
  434. if name not in self._processMap:
  435. iprot.skip(TType.STRUCT)
  436. iprot.readMessageEnd()
  437. x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
  438. oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
  439. x.write(oprot)
  440. oprot.writeMessageEnd()
  441. oprot.trans.flush()
  442. return
  443. else:
  444. self._processMap[name](self, seqid, iprot, oprot)
  445. return True
  446. def process_getName(self, seqid, iprot, oprot):
  447. args = getName_args()
  448. args.read(iprot)
  449. iprot.readMessageEnd()
  450. result = getName_result()
  451. result.success = self._handler.getName()
  452. oprot.writeMessageBegin("getName", TMessageType.REPLY, seqid)
  453. result.write(oprot)
  454. oprot.writeMessageEnd()
  455. oprot.trans.flush()
  456. def process_getVersion(self, seqid, iprot, oprot):
  457. args = getVersion_args()
  458. args.read(iprot)
  459. iprot.readMessageEnd()
  460. result = getVersion_result()
  461. result.success = self._handler.getVersion()
  462. oprot.writeMessageBegin("getVersion", TMessageType.REPLY, seqid)
  463. result.write(oprot)
  464. oprot.writeMessageEnd()
  465. oprot.trans.flush()
  466. def process_getStatus(self, seqid, iprot, oprot):
  467. args = getStatus_args()
  468. args.read(iprot)
  469. iprot.readMessageEnd()
  470. result = getStatus_result()
  471. result.success = self._handler.getStatus()
  472. oprot.writeMessageBegin("getStatus", TMessageType.REPLY, seqid)
  473. result.write(oprot)
  474. oprot.writeMessageEnd()
  475. oprot.trans.flush()
  476. def process_getStatusDetails(self, seqid, iprot, oprot):
  477. args = getStatusDetails_args()
  478. args.read(iprot)
  479. iprot.readMessageEnd()
  480. result = getStatusDetails_result()
  481. result.success = self._handler.getStatusDetails()
  482. oprot.writeMessageBegin("getStatusDetails", TMessageType.REPLY, seqid)
  483. result.write(oprot)
  484. oprot.writeMessageEnd()
  485. oprot.trans.flush()
  486. def process_getCounters(self, seqid, iprot, oprot):
  487. args = getCounters_args()
  488. args.read(iprot)
  489. iprot.readMessageEnd()
  490. result = getCounters_result()
  491. result.success = self._handler.getCounters()
  492. oprot.writeMessageBegin("getCounters", TMessageType.REPLY, seqid)
  493. result.write(oprot)
  494. oprot.writeMessageEnd()
  495. oprot.trans.flush()
  496. def process_getCounter(self, seqid, iprot, oprot):
  497. args = getCounter_args()
  498. args.read(iprot)
  499. iprot.readMessageEnd()
  500. result = getCounter_result()
  501. result.success = self._handler.getCounter(args.key)
  502. oprot.writeMessageBegin("getCounter", TMessageType.REPLY, seqid)
  503. result.write(oprot)
  504. oprot.writeMessageEnd()
  505. oprot.trans.flush()
  506. def process_setOption(self, seqid, iprot, oprot):
  507. args = setOption_args()
  508. args.read(iprot)
  509. iprot.readMessageEnd()
  510. result = setOption_result()
  511. self._handler.setOption(args.key, args.value)
  512. oprot.writeMessageBegin("setOption", TMessageType.REPLY, seqid)
  513. result.write(oprot)
  514. oprot.writeMessageEnd()
  515. oprot.trans.flush()
  516. def process_getOption(self, seqid, iprot, oprot):
  517. args = getOption_args()
  518. args.read(iprot)
  519. iprot.readMessageEnd()
  520. result = getOption_result()
  521. result.success = self._handler.getOption(args.key)
  522. oprot.writeMessageBegin("getOption", TMessageType.REPLY, seqid)
  523. result.write(oprot)
  524. oprot.writeMessageEnd()
  525. oprot.trans.flush()
  526. def process_getOptions(self, seqid, iprot, oprot):
  527. args = getOptions_args()
  528. args.read(iprot)
  529. iprot.readMessageEnd()
  530. result = getOptions_result()
  531. result.success = self._handler.getOptions()
  532. oprot.writeMessageBegin("getOptions", TMessageType.REPLY, seqid)
  533. result.write(oprot)
  534. oprot.writeMessageEnd()
  535. oprot.trans.flush()
  536. def process_getCpuProfile(self, seqid, iprot, oprot):
  537. args = getCpuProfile_args()
  538. args.read(iprot)
  539. iprot.readMessageEnd()
  540. result = getCpuProfile_result()
  541. result.success = self._handler.getCpuProfile(args.profileDurationInSec)
  542. oprot.writeMessageBegin("getCpuProfile", TMessageType.REPLY, seqid)
  543. result.write(oprot)
  544. oprot.writeMessageEnd()
  545. oprot.trans.flush()
  546. def process_aliveSince(self, seqid, iprot, oprot):
  547. args = aliveSince_args()
  548. args.read(iprot)
  549. iprot.readMessageEnd()
  550. result = aliveSince_result()
  551. result.success = self._handler.aliveSince()
  552. oprot.writeMessageBegin("aliveSince", TMessageType.REPLY, seqid)
  553. result.write(oprot)
  554. oprot.writeMessageEnd()
  555. oprot.trans.flush()
  556. def process_reinitialize(self, seqid, iprot, oprot):
  557. args = reinitialize_args()
  558. args.read(iprot)
  559. iprot.readMessageEnd()
  560. self._handler.reinitialize()
  561. return
  562. def process_shutdown(self, seqid, iprot, oprot):
  563. args = shutdown_args()
  564. args.read(iprot)
  565. iprot.readMessageEnd()
  566. self._handler.shutdown()
  567. return
  568. # HELPER FUNCTIONS AND STRUCTURES
  569. class getName_args(object):
  570. thrift_spec = (
  571. )
  572. def read(self, iprot):
  573. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  574. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  575. return
  576. iprot.readStructBegin()
  577. while True:
  578. (fname, ftype, fid) = iprot.readFieldBegin()
  579. if ftype == TType.STOP:
  580. break
  581. else:
  582. iprot.skip(ftype)
  583. iprot.readFieldEnd()
  584. iprot.readStructEnd()
  585. def write(self, oprot):
  586. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  587. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  588. return
  589. oprot.writeStructBegin('getName_args')
  590. oprot.writeFieldStop()
  591. oprot.writeStructEnd()
  592. def __repr__(self):
  593. L = ['%s=%r' % (key, value)
  594. for key, value in self.__dict__.iteritems()]
  595. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  596. def __eq__(self, other):
  597. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  598. def __ne__(self, other):
  599. return not (self == other)
  600. class getName_result(object):
  601. """
  602. Attributes:
  603. - success
  604. """
  605. thrift_spec = (
  606. (0, TType.STRING, 'success', None, None, ), # 0
  607. )
  608. def __init__(self, success=None,):
  609. self.success = success
  610. def read(self, iprot):
  611. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  612. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  613. return
  614. iprot.readStructBegin()
  615. while True:
  616. (fname, ftype, fid) = iprot.readFieldBegin()
  617. if ftype == TType.STOP:
  618. break
  619. if fid == 0:
  620. if ftype == TType.STRING:
  621. self.success = iprot.readString();
  622. else:
  623. iprot.skip(ftype)
  624. else:
  625. iprot.skip(ftype)
  626. iprot.readFieldEnd()
  627. iprot.readStructEnd()
  628. def write(self, oprot):
  629. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  630. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  631. return
  632. oprot.writeStructBegin('getName_result')
  633. if self.success != None:
  634. oprot.writeFieldBegin('success', TType.STRING, 0)
  635. oprot.writeString(self.success)
  636. oprot.writeFieldEnd()
  637. oprot.writeFieldStop()
  638. oprot.writeStructEnd()
  639. def __repr__(self):
  640. L = ['%s=%r' % (key, value)
  641. for key, value in self.__dict__.iteritems()]
  642. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  643. def __eq__(self, other):
  644. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  645. def __ne__(self, other):
  646. return not (self == other)
  647. class getVersion_args(object):
  648. thrift_spec = (
  649. )
  650. def read(self, iprot):
  651. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  652. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  653. return
  654. iprot.readStructBegin()
  655. while True:
  656. (fname, ftype, fid) = iprot.readFieldBegin()
  657. if ftype == TType.STOP:
  658. break
  659. else:
  660. iprot.skip(ftype)
  661. iprot.readFieldEnd()
  662. iprot.readStructEnd()
  663. def write(self, oprot):
  664. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  665. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  666. return
  667. oprot.writeStructBegin('getVersion_args')
  668. oprot.writeFieldStop()
  669. oprot.writeStructEnd()
  670. def __repr__(self):
  671. L = ['%s=%r' % (key, value)
  672. for key, value in self.__dict__.iteritems()]
  673. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  674. def __eq__(self, other):
  675. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  676. def __ne__(self, other):
  677. return not (self == other)
  678. class getVersion_result(object):
  679. """
  680. Attributes:
  681. - success
  682. """
  683. thrift_spec = (
  684. (0, TType.STRING, 'success', None, None, ), # 0
  685. )
  686. def __init__(self, success=None,):
  687. self.success = success
  688. def read(self, iprot):
  689. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  690. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  691. return
  692. iprot.readStructBegin()
  693. while True:
  694. (fname, ftype, fid) = iprot.readFieldBegin()
  695. if ftype == TType.STOP:
  696. break
  697. if fid == 0:
  698. if ftype == TType.STRING:
  699. self.success = iprot.readString();
  700. else:
  701. iprot.skip(ftype)
  702. else:
  703. iprot.skip(ftype)
  704. iprot.readFieldEnd()
  705. iprot.readStructEnd()
  706. def write(self, oprot):
  707. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  708. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  709. return
  710. oprot.writeStructBegin('getVersion_result')
  711. if self.success != None:
  712. oprot.writeFieldBegin('success', TType.STRING, 0)
  713. oprot.writeString(self.success)
  714. oprot.writeFieldEnd()
  715. oprot.writeFieldStop()
  716. oprot.writeStructEnd()
  717. def __repr__(self):
  718. L = ['%s=%r' % (key, value)
  719. for key, value in self.__dict__.iteritems()]
  720. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  721. def __eq__(self, other):
  722. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  723. def __ne__(self, other):
  724. return not (self == other)
  725. class getStatus_args(object):
  726. thrift_spec = (
  727. )
  728. def read(self, iprot):
  729. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  730. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  731. return
  732. iprot.readStructBegin()
  733. while True:
  734. (fname, ftype, fid) = iprot.readFieldBegin()
  735. if ftype == TType.STOP:
  736. break
  737. else:
  738. iprot.skip(ftype)
  739. iprot.readFieldEnd()
  740. iprot.readStructEnd()
  741. def write(self, oprot):
  742. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  743. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  744. return
  745. oprot.writeStructBegin('getStatus_args')
  746. oprot.writeFieldStop()
  747. oprot.writeStructEnd()
  748. def __repr__(self):
  749. L = ['%s=%r' % (key, value)
  750. for key, value in self.__dict__.iteritems()]
  751. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  752. def __eq__(self, other):
  753. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  754. def __ne__(self, other):
  755. return not (self == other)
  756. class getStatus_result(object):
  757. """
  758. Attributes:
  759. - success
  760. """
  761. thrift_spec = (
  762. (0, TType.I32, 'success', None, None, ), # 0
  763. )
  764. def __init__(self, success=None,):
  765. self.success = success
  766. def read(self, iprot):
  767. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  768. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  769. return
  770. iprot.readStructBegin()
  771. while True:
  772. (fname, ftype, fid) = iprot.readFieldBegin()
  773. if ftype == TType.STOP:
  774. break
  775. if fid == 0:
  776. if ftype == TType.I32:
  777. self.success = iprot.readI32();
  778. else:
  779. iprot.skip(ftype)
  780. else:
  781. iprot.skip(ftype)
  782. iprot.readFieldEnd()
  783. iprot.readStructEnd()
  784. def write(self, oprot):
  785. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  786. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  787. return
  788. oprot.writeStructBegin('getStatus_result')
  789. if self.success != None:
  790. oprot.writeFieldBegin('success', TType.I32, 0)
  791. oprot.writeI32(self.success)
  792. oprot.writeFieldEnd()
  793. oprot.writeFieldStop()
  794. oprot.writeStructEnd()
  795. def __repr__(self):
  796. L = ['%s=%r' % (key, value)
  797. for key, value in self.__dict__.iteritems()]
  798. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  799. def __eq__(self, other):
  800. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  801. def __ne__(self, other):
  802. return not (self == other)
  803. class getStatusDetails_args(object):
  804. thrift_spec = (
  805. )
  806. def read(self, iprot):
  807. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  808. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  809. return
  810. iprot.readStructBegin()
  811. while True:
  812. (fname, ftype, fid) = iprot.readFieldBegin()
  813. if ftype == TType.STOP:
  814. break
  815. else:
  816. iprot.skip(ftype)
  817. iprot.readFieldEnd()
  818. iprot.readStructEnd()
  819. def write(self, oprot):
  820. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  821. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  822. return
  823. oprot.writeStructBegin('getStatusDetails_args')
  824. oprot.writeFieldStop()
  825. oprot.writeStructEnd()
  826. def __repr__(self):
  827. L = ['%s=%r' % (key, value)
  828. for key, value in self.__dict__.iteritems()]
  829. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  830. def __eq__(self, other):
  831. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  832. def __ne__(self, other):
  833. return not (self == other)
  834. class getStatusDetails_result(object):
  835. """
  836. Attributes:
  837. - success
  838. """
  839. thrift_spec = (
  840. (0, TType.STRING, 'success', None, None, ), # 0
  841. )
  842. def __init__(self, success=None,):
  843. self.success = success
  844. def read(self, iprot):
  845. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  846. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  847. return
  848. iprot.readStructBegin()
  849. while True:
  850. (fname, ftype, fid) = iprot.readFieldBegin()
  851. if ftype == TType.STOP:
  852. break
  853. if fid == 0:
  854. if ftype == TType.STRING:
  855. self.success = iprot.readString();
  856. else:
  857. iprot.skip(ftype)
  858. else:
  859. iprot.skip(ftype)
  860. iprot.readFieldEnd()
  861. iprot.readStructEnd()
  862. def write(self, oprot):
  863. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  864. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  865. return
  866. oprot.writeStructBegin('getStatusDetails_result')
  867. if self.success != None:
  868. oprot.writeFieldBegin('success', TType.STRING, 0)
  869. oprot.writeString(self.success)
  870. oprot.writeFieldEnd()
  871. oprot.writeFieldStop()
  872. oprot.writeStructEnd()
  873. def __repr__(self):
  874. L = ['%s=%r' % (key, value)
  875. for key, value in self.__dict__.iteritems()]
  876. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  877. def __eq__(self, other):
  878. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  879. def __ne__(self, other):
  880. return not (self == other)
  881. class getCounters_args(object):
  882. thrift_spec = (
  883. )
  884. def read(self, iprot):
  885. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  886. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  887. return
  888. iprot.readStructBegin()
  889. while True:
  890. (fname, ftype, fid) = iprot.readFieldBegin()
  891. if ftype == TType.STOP:
  892. break
  893. else:
  894. iprot.skip(ftype)
  895. iprot.readFieldEnd()
  896. iprot.readStructEnd()
  897. def write(self, oprot):
  898. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  899. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  900. return
  901. oprot.writeStructBegin('getCounters_args')
  902. oprot.writeFieldStop()
  903. oprot.writeStructEnd()
  904. def __repr__(self):
  905. L = ['%s=%r' % (key, value)
  906. for key, value in self.__dict__.iteritems()]
  907. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  908. def __eq__(self, other):
  909. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  910. def __ne__(self, other):
  911. return not (self == other)
  912. class getCounters_result(object):
  913. """
  914. Attributes:
  915. - success
  916. """
  917. thrift_spec = (
  918. (0, TType.MAP, 'success', (TType.STRING,None,TType.I64,None), None, ), # 0
  919. )
  920. def __init__(self, success=None,):
  921. self.success = success
  922. def read(self, iprot):
  923. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  924. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  925. return
  926. iprot.readStructBegin()
  927. while True:
  928. (fname, ftype, fid) = iprot.readFieldBegin()
  929. if ftype == TType.STOP:
  930. break
  931. if fid == 0:
  932. if ftype == TType.MAP:
  933. self.success = {}
  934. (_ktype1, _vtype2, _size0 ) = iprot.readMapBegin()
  935. for _i4 in xrange(_size0):
  936. _key5 = iprot.readString();
  937. _val6 = iprot.readI64();
  938. self.success[_key5] = _val6
  939. iprot.readMapEnd()
  940. else:
  941. iprot.skip(ftype)
  942. else:
  943. iprot.skip(ftype)
  944. iprot.readFieldEnd()
  945. iprot.readStructEnd()
  946. def write(self, oprot):
  947. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  948. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  949. return
  950. oprot.writeStructBegin('getCounters_result')
  951. if self.success != None:
  952. oprot.writeFieldBegin('success', TType.MAP, 0)
  953. oprot.writeMapBegin(TType.STRING, TType.I64, len(self.success))
  954. for kiter7,viter8 in self.success.items():
  955. oprot.writeString(kiter7)
  956. oprot.writeI64(viter8)
  957. oprot.writeMapEnd()
  958. oprot.writeFieldEnd()
  959. oprot.writeFieldStop()
  960. oprot.writeStructEnd()
  961. def __repr__(self):
  962. L = ['%s=%r' % (key, value)
  963. for key, value in self.__dict__.iteritems()]
  964. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  965. def __eq__(self, other):
  966. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  967. def __ne__(self, other):
  968. return not (self == other)
  969. class getCounter_args(object):
  970. """
  971. Attributes:
  972. - key
  973. """
  974. thrift_spec = (
  975. None, # 0
  976. (1, TType.STRING, 'key', None, None, ), # 1
  977. )
  978. def __init__(self, key=None,):
  979. self.key = key
  980. def read(self, iprot):
  981. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  982. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  983. return
  984. iprot.readStructBegin()
  985. while True:
  986. (fname, ftype, fid) = iprot.readFieldBegin()
  987. if ftype == TType.STOP:
  988. break
  989. if fid == 1:
  990. if ftype == TType.STRING:
  991. self.key = iprot.readString();
  992. else:
  993. iprot.skip(ftype)
  994. else:
  995. iprot.skip(ftype)
  996. iprot.readFieldEnd()
  997. iprot.readStructEnd()
  998. def write(self, oprot):
  999. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1000. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1001. return
  1002. oprot.writeStructBegin('getCounter_args')
  1003. if self.key != None:
  1004. oprot.writeFieldBegin('key', TType.STRING, 1)
  1005. oprot.writeString(self.key)
  1006. oprot.writeFieldEnd()
  1007. oprot.writeFieldStop()
  1008. oprot.writeStructEnd()
  1009. def __repr__(self):
  1010. L = ['%s=%r' % (key, value)
  1011. for key, value in self.__dict__.iteritems()]
  1012. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1013. def __eq__(self, other):
  1014. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1015. def __ne__(self, other):
  1016. return not (self == other)
  1017. class getCounter_result(object):
  1018. """
  1019. Attributes:
  1020. - success
  1021. """
  1022. thrift_spec = (
  1023. (0, TType.I64, 'success', None, None, ), # 0
  1024. )
  1025. def __init__(self, success=None,):
  1026. self.success = success
  1027. def read(self, iprot):
  1028. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1029. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1030. return
  1031. iprot.readStructBegin()
  1032. while True:
  1033. (fname, ftype, fid) = iprot.readFieldBegin()
  1034. if ftype == TType.STOP:
  1035. break
  1036. if fid == 0:
  1037. if ftype == TType.I64:
  1038. self.success = iprot.readI64();
  1039. else:
  1040. iprot.skip(ftype)
  1041. else:
  1042. iprot.skip(ftype)
  1043. iprot.readFieldEnd()
  1044. iprot.readStructEnd()
  1045. def write(self, oprot):
  1046. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1047. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1048. return
  1049. oprot.writeStructBegin('getCounter_result')
  1050. if self.success != None:
  1051. oprot.writeFieldBegin('success', TType.I64, 0)
  1052. oprot.writeI64(self.success)
  1053. oprot.writeFieldEnd()
  1054. oprot.writeFieldStop()
  1055. oprot.writeStructEnd()
  1056. def __repr__(self):
  1057. L = ['%s=%r' % (key, value)
  1058. for key, value in self.__dict__.iteritems()]
  1059. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1060. def __eq__(self, other):
  1061. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1062. def __ne__(self, other):
  1063. return not (self == other)
  1064. class setOption_args(object):
  1065. """
  1066. Attributes:
  1067. - key
  1068. - value
  1069. """
  1070. thrift_spec = (
  1071. None, # 0
  1072. (1, TType.STRING, 'key', None, None, ), # 1
  1073. (2, TType.STRING, 'value', None, None, ), # 2
  1074. )
  1075. def __init__(self, key=None, value=None,):
  1076. self.key = key
  1077. self.value = value
  1078. def read(self, iprot):
  1079. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1080. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1081. return
  1082. iprot.readStructBegin()
  1083. while True:
  1084. (fname, ftype, fid) = iprot.readFieldBegin()
  1085. if ftype == TType.STOP:
  1086. break
  1087. if fid == 1:
  1088. if ftype == TType.STRING:
  1089. self.key = iprot.readString();
  1090. else:
  1091. iprot.skip(ftype)
  1092. elif fid == 2:
  1093. if ftype == TType.STRING:
  1094. self.value = iprot.readString();
  1095. else:
  1096. iprot.skip(ftype)
  1097. else:
  1098. iprot.skip(ftype)
  1099. iprot.readFieldEnd()
  1100. iprot.readStructEnd()
  1101. def write(self, oprot):
  1102. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1103. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1104. return
  1105. oprot.writeStructBegin('setOption_args')
  1106. if self.key != None:
  1107. oprot.writeFieldBegin('key', TType.STRING, 1)
  1108. oprot.writeString(self.key)
  1109. oprot.writeFieldEnd()
  1110. if self.value != None:
  1111. oprot.writeFieldBegin('value', TType.STRING, 2)
  1112. oprot.writeString(self.value)
  1113. oprot.writeFieldEnd()
  1114. oprot.writeFieldStop()
  1115. oprot.writeStructEnd()
  1116. def __repr__(self):
  1117. L = ['%s=%r' % (key, value)
  1118. for key, value in self.__dict__.iteritems()]
  1119. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1120. def __eq__(self, other):
  1121. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1122. def __ne__(self, other):
  1123. return not (self == other)
  1124. class setOption_result(object):
  1125. thrift_spec = (
  1126. )
  1127. def read(self, iprot):
  1128. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1129. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1130. return
  1131. iprot.readStructBegin()
  1132. while True:
  1133. (fname, ftype, fid) = iprot.readFieldBegin()
  1134. if ftype == TType.STOP:
  1135. break
  1136. else:
  1137. iprot.skip(ftype)
  1138. iprot.readFieldEnd()
  1139. iprot.readStructEnd()
  1140. def write(self, oprot):
  1141. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1142. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1143. return
  1144. oprot.writeStructBegin('setOption_result')
  1145. oprot.writeFieldStop()
  1146. oprot.writeStructEnd()
  1147. def __repr__(self):
  1148. L = ['%s=%r' % (key, value)
  1149. for key, value in self.__dict__.iteritems()]
  1150. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1151. def __eq__(self, other):
  1152. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1153. def __ne__(self, other):
  1154. return not (self == other)
  1155. class getOption_args(object):
  1156. """
  1157. Attributes:
  1158. - key
  1159. """
  1160. thrift_spec = (
  1161. None, # 0
  1162. (1, TType.STRING, 'key', None, None, ), # 1
  1163. )
  1164. def __init__(self, key=None,):
  1165. self.key = key
  1166. def read(self, iprot):
  1167. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1168. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1169. return
  1170. iprot.readStructBegin()
  1171. while True:
  1172. (fname, ftype, fid) = iprot.readFieldBegin()
  1173. if ftype == TType.STOP:
  1174. break
  1175. if fid == 1:
  1176. if ftype == TType.STRING:
  1177. self.key = iprot.readString();
  1178. else:
  1179. iprot.skip(ftype)
  1180. else:
  1181. iprot.skip(ftype)
  1182. iprot.readFieldEnd()
  1183. iprot.readStructEnd()
  1184. def write(self, oprot):
  1185. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1186. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1187. return
  1188. oprot.writeStructBegin('getOption_args')
  1189. if self.key != None:
  1190. oprot.writeFieldBegin('key', TType.STRING, 1)
  1191. oprot.writeString(self.key)
  1192. oprot.writeFieldEnd()
  1193. oprot.writeFieldStop()
  1194. oprot.writeStructEnd()
  1195. def __repr__(self):
  1196. L = ['%s=%r' % (key, value)
  1197. for key, value in self.__dict__.iteritems()]
  1198. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1199. def __eq__(self, other):
  1200. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1201. def __ne__(self, other):
  1202. return not (self == other)
  1203. class getOption_result(object):
  1204. """
  1205. Attributes:
  1206. - success
  1207. """
  1208. thrift_spec = (
  1209. (0, TType.STRING, 'success', None, None, ), # 0
  1210. )
  1211. def __init__(self, success=None,):
  1212. self.success = success
  1213. def read(self, iprot):
  1214. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1215. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1216. return
  1217. iprot.readStructBegin()
  1218. while True:
  1219. (fname, ftype, fid) = iprot.readFieldBegin()
  1220. if ftype == TType.STOP:
  1221. break
  1222. if fid == 0:
  1223. if ftype == TType.STRING:
  1224. self.success = iprot.readString();
  1225. else:
  1226. iprot.skip(ftype)
  1227. else:
  1228. iprot.skip(ftype)
  1229. iprot.readFieldEnd()
  1230. iprot.readStructEnd()
  1231. def write(self, oprot):
  1232. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1233. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1234. return
  1235. oprot.writeStructBegin('getOption_result')
  1236. if self.success != None:
  1237. oprot.writeFieldBegin('success', TType.STRING, 0)
  1238. oprot.writeString(self.success)
  1239. oprot.writeFieldEnd()
  1240. oprot.writeFieldStop()
  1241. oprot.writeStructEnd()
  1242. def __repr__(self):
  1243. L = ['%s=%r' % (key, value)
  1244. for key, value in self.__dict__.iteritems()]
  1245. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1246. def __eq__(self, other):
  1247. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1248. def __ne__(self, other):
  1249. return not (self == other)
  1250. class getOptions_args(object):
  1251. thrift_spec = (
  1252. )
  1253. def read(self, iprot):
  1254. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1255. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1256. return
  1257. iprot.readStructBegin()
  1258. while True:
  1259. (fname, ftype, fid) = iprot.readFieldBegin()
  1260. if ftype == TType.STOP:
  1261. break
  1262. else:
  1263. iprot.skip(ftype)
  1264. iprot.readFieldEnd()
  1265. iprot.readStructEnd()
  1266. def write(self, oprot):
  1267. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1268. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1269. return
  1270. oprot.writeStructBegin('getOptions_args')
  1271. oprot.writeFieldStop()
  1272. oprot.writeStructEnd()
  1273. def __repr__(self):
  1274. L = ['%s=%r' % (key, value)
  1275. for key, value in self.__dict__.iteritems()]
  1276. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1277. def __eq__(self, other):
  1278. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1279. def __ne__(self, other):
  1280. return not (self == other)
  1281. class getOptions_result(object):
  1282. """
  1283. Attributes:
  1284. - success
  1285. """
  1286. thrift_spec = (
  1287. (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0
  1288. )
  1289. def __init__(self, success=None,):
  1290. self.success = success
  1291. def read(self, iprot):
  1292. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1293. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1294. return
  1295. iprot.readStructBegin()
  1296. while True:
  1297. (fname, ftype, fid) = iprot.readFieldBegin()
  1298. if ftype == TType.STOP:
  1299. break
  1300. if fid == 0:
  1301. if ftype == TType.MAP:
  1302. self.success = {}
  1303. (_ktype10, _vtype11, _size9 ) = iprot.readMapBegin()
  1304. for _i13 in xrange(_size9):
  1305. _key14 = iprot.readString();
  1306. _val15 = iprot.readString();
  1307. self.success[_key14] = _val15
  1308. iprot.readMapEnd()
  1309. else:
  1310. iprot.skip(ftype)
  1311. else:
  1312. iprot.skip(ftype)
  1313. iprot.readFieldEnd()
  1314. iprot.readStructEnd()
  1315. def write(self, oprot):
  1316. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1317. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1318. return
  1319. oprot.writeStructBegin('getOptions_result')
  1320. if self.success != None:
  1321. oprot.writeFieldBegin('success', TType.MAP, 0)
  1322. oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))
  1323. for kiter16,viter17 in self.success.items():
  1324. oprot.writeString(kiter16)
  1325. oprot.writeString(viter17)
  1326. oprot.writeMapEnd()
  1327. oprot.writeFieldEnd()
  1328. oprot.writeFieldStop()
  1329. oprot.writeStructEnd()
  1330. def __repr__(self):
  1331. L = ['%s=%r' % (key, value)
  1332. for key, value in self.__dict__.iteritems()]
  1333. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1334. def __eq__(self, other):
  1335. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1336. def __ne__(self, other):
  1337. return not (self == other)
  1338. class getCpuProfile_args(object):
  1339. """
  1340. Attributes:
  1341. - profileDurationInSec
  1342. """
  1343. thrift_spec = (
  1344. None, # 0
  1345. (1, TType.I32, 'profileDurationInSec', None, None, ), # 1
  1346. )
  1347. def __init__(self, profileDurationInSec=None,):
  1348. self.profileDurationInSec = profileDurationInSec
  1349. def read(self, iprot):
  1350. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1351. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1352. return
  1353. iprot.readStructBegin()
  1354. while True:
  1355. (fname, ftype, fid) = iprot.readFieldBegin()
  1356. if ftype == TType.STOP:
  1357. break
  1358. if fid == 1:
  1359. if ftype == TType.I32:
  1360. self.profileDurationInSec = iprot.readI32();
  1361. else:
  1362. iprot.skip(ftype)
  1363. else:
  1364. iprot.skip(ftype)
  1365. iprot.readFieldEnd()
  1366. iprot.readStructEnd()
  1367. def write(self, oprot):
  1368. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1369. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1370. return
  1371. oprot.writeStructBegin('getCpuProfile_args')
  1372. if self.profileDurationInSec != None:
  1373. oprot.writeFieldBegin('profileDurationInSec', TType.I32, 1)
  1374. oprot.writeI32(self.profileDurationInSec)
  1375. oprot.writeFieldEnd()
  1376. oprot.writeFieldStop()
  1377. oprot.writeStructEnd()
  1378. def __repr__(self):
  1379. L = ['%s=%r' % (key, value)
  1380. for key, value in self.__dict__.iteritems()]
  1381. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1382. def __eq__(self, other):
  1383. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1384. def __ne__(self, other):
  1385. return not (self == other)
  1386. class getCpuProfile_result(object):
  1387. """
  1388. Attributes:
  1389. - success
  1390. """
  1391. thrift_spec = (
  1392. (0, TType.STRING, 'success', None, None, ), # 0
  1393. )
  1394. def __init__(self, success=None,):
  1395. self.success = success
  1396. def read(self, iprot):
  1397. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1398. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1399. return
  1400. iprot.readStructBegin()
  1401. while True:
  1402. (fname, ftype, fid) = iprot.readFieldBegin()
  1403. if ftype == TType.STOP:
  1404. break
  1405. if fid == 0:
  1406. if ftype == TType.STRING:
  1407. self.success = iprot.readString();
  1408. else:
  1409. iprot.skip(ftype)
  1410. else:
  1411. iprot.skip(ftype)
  1412. iprot.readFieldEnd()
  1413. iprot.readStructEnd()
  1414. def write(self, oprot):
  1415. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1416. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1417. return
  1418. oprot.writeStructBegin('getCpuProfile_result')
  1419. if self.success != None:
  1420. oprot.writeFieldBegin('success', TType.STRING, 0)
  1421. oprot.writeString(self.success)
  1422. oprot.writeFieldEnd()
  1423. oprot.writeFieldStop()
  1424. oprot.writeStructEnd()
  1425. def __repr__(self):
  1426. L = ['%s=%r' % (key, value)
  1427. for key, value in self.__dict__.iteritems()]
  1428. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1429. def __eq__(self, other):
  1430. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1431. def __ne__(self, other):
  1432. return not (self == other)
  1433. class aliveSince_args(object):
  1434. thrift_spec = (
  1435. )
  1436. def read(self, iprot):
  1437. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1438. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1439. return
  1440. iprot.readStructBegin()
  1441. while True:
  1442. (fname, ftype, fid) = iprot.readFieldBegin()
  1443. if ftype == TType.STOP:
  1444. break
  1445. else:
  1446. iprot.skip(ftype)
  1447. iprot.readFieldEnd()
  1448. iprot.readStructEnd()
  1449. def write(self, oprot):
  1450. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1451. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1452. return
  1453. oprot.writeStructBegin('aliveSince_args')
  1454. oprot.writeFieldStop()
  1455. oprot.writeStructEnd()
  1456. def __repr__(self):
  1457. L = ['%s=%r' % (key, value)
  1458. for key, value in self.__dict__.iteritems()]
  1459. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1460. def __eq__(self, other):
  1461. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1462. def __ne__(self, other):
  1463. return not (self == other)
  1464. class aliveSince_result(object):
  1465. """
  1466. Attributes:
  1467. - success
  1468. """
  1469. thrift_spec = (
  1470. (0, TType.I64, 'success', None, None, ), # 0
  1471. )
  1472. def __init__(self, success=None,):
  1473. self.success = success
  1474. def read(self, iprot):
  1475. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1476. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1477. return
  1478. iprot.readStructBegin()
  1479. while True:
  1480. (fname, ftype, fid) = iprot.readFieldBegin()
  1481. if ftype == TType.STOP:
  1482. break
  1483. if fid == 0:
  1484. if ftype == TType.I64:
  1485. self.success = iprot.readI64();
  1486. else:
  1487. iprot.skip(ftype)
  1488. else:
  1489. iprot.skip(ftype)
  1490. iprot.readFieldEnd()
  1491. iprot.readStructEnd()
  1492. def write(self, oprot):
  1493. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1494. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1495. return
  1496. oprot.writeStructBegin('aliveSince_result')
  1497. if self.success != None:
  1498. oprot.writeFieldBegin('success', TType.I64, 0)
  1499. oprot.writeI64(self.success)
  1500. oprot.writeFieldEnd()
  1501. oprot.writeFieldStop()
  1502. oprot.writeStructEnd()
  1503. def __repr__(self):
  1504. L = ['%s=%r' % (key, value)
  1505. for key, value in self.__dict__.iteritems()]
  1506. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1507. def __eq__(self, other):
  1508. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1509. def __ne__(self, other):
  1510. return not (self == other)
  1511. class reinitialize_args(object):
  1512. thrift_spec = (
  1513. )
  1514. def read(self, iprot):
  1515. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1516. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1517. return
  1518. iprot.readStructBegin()
  1519. while True:
  1520. (fname, ftype, fid) = iprot.readFieldBegin()
  1521. if ftype == TType.STOP:
  1522. break
  1523. else:
  1524. iprot.skip(ftype)
  1525. iprot.readFieldEnd()
  1526. iprot.readStructEnd()
  1527. def write(self, oprot):
  1528. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1529. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1530. return
  1531. oprot.writeStructBegin('reinitialize_args')
  1532. oprot.writeFieldStop()
  1533. oprot.writeStructEnd()
  1534. def __repr__(self):
  1535. L = ['%s=%r' % (key, value)
  1536. for key, value in self.__dict__.iteritems()]
  1537. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1538. def __eq__(self, other):
  1539. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1540. def __ne__(self, other):
  1541. return not (self == other)
  1542. class shutdown_args(object):
  1543. thrift_spec = (
  1544. )
  1545. def read(self, iprot):
  1546. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1547. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1548. return
  1549. iprot.readStructBegin()
  1550. while True:
  1551. (fname, ftype, fid) = iprot.readFieldBegin()
  1552. if ftype == TType.STOP:
  1553. break
  1554. else:
  1555. iprot.skip(ftype)
  1556. iprot.readFieldEnd()
  1557. iprot.readStructEnd()
  1558. def write(self, oprot):
  1559. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1560. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1561. return
  1562. oprot.writeStructBegin('shutdown_args')
  1563. oprot.writeFieldStop()
  1564. oprot.writeStructEnd()
  1565. def __repr__(self):
  1566. L = ['%s=%r' % (key, value)
  1567. for key, value in self.__dict__.iteritems()]
  1568. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1569. def __eq__(self, other):
  1570. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1571. def __ne__(self, other):
  1572. return not (self == other)