transactd 1.2.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (306) hide show
  1. checksums.yaml +4 -4
  2. data/BUILD_UNIX-JA +46 -67
  3. data/BUILD_WIN-JA +106 -63
  4. data/CMakeLists.txt +40 -15
  5. data/README +219 -75
  6. data/README-JA +207 -76
  7. data/README_ORMSRCGEN +118 -0
  8. data/README_ORMSRCGEN-JA +115 -0
  9. data/bin/common/tdclc_32_2_0.dll +0 -0
  10. data/bin/common/tdclc_64_2_0.dll +0 -0
  11. data/build/common/check_for_link_iconv.cmake +18 -14
  12. data/build/common/create_symlink.cmake.in +25 -0
  13. data/build/common/get_boost_libs.cmake +23 -23
  14. data/build/common/options.cmake +0 -66
  15. data/build/common/smart_install.cmake +3 -3
  16. data/build/common/transactd.rc.in +15 -5
  17. data/build/common/transactd_cl_common.cmake +37 -18
  18. data/build/common/transactd_cl_output.cmake +55 -13
  19. data/build/common/transactd_common.cmake +108 -31
  20. data/build/swig/php/generate.cmake.in +15 -17
  21. data/build/swig/php/generate.cmd.in +15 -9
  22. data/build/swig/php/php.swg +124 -82
  23. data/build/swig/php/transactd.no_yield.php +4494 -0
  24. data/build/swig/php/transactd.no_yield.php.git.patch +685 -0
  25. data/build/swig/php/transactd.no_yield.php.patch +685 -0
  26. data/build/swig/php/transactd.yield.php +4461 -0
  27. data/build/swig/php/transactd.yield.php.git.patch +652 -0
  28. data/build/swig/php/transactd.yield.php.patch +652 -0
  29. data/build/swig/referencecounter.h +79 -0
  30. data/build/swig/ruby/ruby.swg +226 -76
  31. data/build/swig/ruby/threadBlockRegionWrapper.h +71 -0
  32. data/build/swig/ruby/without_gvl.swg +87 -0
  33. data/build/swig/tdcl.i +659 -170
  34. data/build/swig/validatablepointer.h +91 -0
  35. data/build/tdclc/CMakeLists.txt +49 -34
  36. data/build/tdclc/{tdclc_64.cbproj → tdclc.cbproj} +65 -20
  37. data/build/tdclc/tdclc.rc +0 -0
  38. data/build/tdclcpp/CMakeLists.txt +84 -20
  39. data/build/tdclcpp/tdclcpp.rc +0 -0
  40. data/build/tdclcpp/{tdclcpp_bcb_64.cbproj → tdclcpp_bc.cbproj} +168 -44
  41. data/build/tdclrb/CMakeLists.txt +84 -66
  42. data/build/tdclrb/bldgem/extconf.rb +28 -3
  43. data/build/tdclrb/gem/helper.rb +11 -1
  44. data/build/tdclrb/gem_output.cmake +20 -16
  45. data/index_ja.html +15 -0
  46. data/source/bzs/db/IBlobBuffer.h +15 -17
  47. data/source/bzs/db/blobBuffer.h +186 -140
  48. data/source/bzs/db/blobStructs.h +37 -37
  49. data/source/bzs/db/engine/mysql/IReadRecords.h +34 -34
  50. data/source/bzs/db/engine/mysql/bookmark.h +150 -147
  51. data/source/bzs/db/engine/mysql/database.cpp +1721 -1526
  52. data/source/bzs/db/engine/mysql/database.h +608 -370
  53. data/source/bzs/db/engine/mysql/dbManager.cpp +213 -201
  54. data/source/bzs/db/engine/mysql/dbManager.h +115 -104
  55. data/source/bzs/db/engine/mysql/errorMessage.cpp +49 -50
  56. data/source/bzs/db/engine/mysql/errorMessage.h +25 -26
  57. data/source/bzs/db/engine/mysql/fieldAccess.h +55 -61
  58. data/source/bzs/db/engine/mysql/mydebuglog.cpp +326 -292
  59. data/source/bzs/db/engine/mysql/mydebuglog.h +63 -55
  60. data/source/bzs/db/engine/mysql/mysqlInternal.h +182 -125
  61. data/source/bzs/db/engine/mysql/mysqlThd.cpp +121 -121
  62. data/source/bzs/db/engine/mysql/mysqlThd.h +20 -20
  63. data/source/bzs/db/engine/mysql/percentageKey.h +241 -228
  64. data/source/bzs/db/protocol/ICommandExecuter.h +18 -17
  65. data/source/bzs/db/protocol/hs/hsCommandExecuter.cpp +543 -514
  66. data/source/bzs/db/protocol/hs/hsCommandExecuter.h +155 -158
  67. data/source/bzs/db/protocol/tdap/btrDate.cpp +213 -180
  68. data/source/bzs/db/protocol/tdap/btrDate.h +39 -37
  69. data/source/bzs/db/protocol/tdap/client/activeTable.cpp +173 -0
  70. data/source/bzs/db/protocol/tdap/client/activeTable.h +165 -0
  71. data/source/bzs/db/protocol/tdap/client/activeTableImple.h +370 -0
  72. data/source/bzs/db/protocol/tdap/client/bulkInsert.h +13 -23
  73. data/source/bzs/db/protocol/tdap/client/client.cpp +81 -68
  74. data/source/bzs/db/protocol/tdap/client/client.h +361 -320
  75. data/source/bzs/db/protocol/tdap/client/connMgr.cpp +17 -22
  76. data/source/bzs/db/protocol/tdap/client/connMgr.h +17 -19
  77. data/source/bzs/db/protocol/tdap/client/connectionPool.cpp +243 -0
  78. data/source/bzs/db/protocol/tdap/client/connectionPool.h +109 -0
  79. data/source/bzs/db/protocol/tdap/client/database.cpp +327 -219
  80. data/source/bzs/db/protocol/tdap/client/database.h +141 -118
  81. data/source/bzs/db/protocol/tdap/client/databaseFactory.cpp +60 -62
  82. data/source/bzs/db/protocol/tdap/client/databaseManager.h +255 -0
  83. data/source/bzs/db/protocol/tdap/client/dbDef.cpp +315 -202
  84. data/source/bzs/db/protocol/tdap/client/dbDef.h +40 -32
  85. data/source/bzs/db/protocol/tdap/client/dllmain.cpp +390 -371
  86. data/source/bzs/db/protocol/tdap/client/errorMessage.cpp +148 -56
  87. data/source/bzs/db/protocol/tdap/client/errorMessage_ja.cpp +149 -57
  88. data/source/bzs/db/protocol/tdap/client/export.h +35 -0
  89. data/source/bzs/db/protocol/tdap/client/field.cpp +1985 -0
  90. data/source/bzs/db/protocol/tdap/client/field.h +393 -0
  91. data/source/bzs/db/protocol/tdap/client/fieldDDF.cpp +14 -14
  92. data/source/bzs/db/protocol/tdap/client/fieldDDF.h +11 -14
  93. data/source/bzs/db/protocol/tdap/client/fieldNameAlias.cpp +123 -0
  94. data/source/bzs/db/protocol/tdap/client/fieldNameAlias.h +58 -0
  95. data/source/bzs/db/protocol/tdap/client/fields.h +178 -0
  96. data/source/bzs/db/protocol/tdap/client/fileDDF.cpp +13 -16
  97. data/source/bzs/db/protocol/tdap/client/fileDDF.h +11 -17
  98. data/source/bzs/db/protocol/tdap/client/filter.h +423 -259
  99. data/source/bzs/db/protocol/tdap/client/groupComp.h +117 -0
  100. data/source/bzs/db/protocol/tdap/client/groupQuery.cpp +818 -0
  101. data/source/bzs/db/protocol/tdap/client/groupQuery.h +281 -0
  102. data/source/bzs/db/protocol/tdap/client/indexDDF.cpp +14 -17
  103. data/source/bzs/db/protocol/tdap/client/indexDDF.h +11 -14
  104. data/source/bzs/db/protocol/tdap/client/memRecord.cpp +231 -0
  105. data/source/bzs/db/protocol/tdap/client/memRecord.h +145 -0
  106. data/source/bzs/db/protocol/tdap/client/memRecordset.cpp +448 -0
  107. data/source/bzs/db/protocol/tdap/client/memRecordset.h +159 -0
  108. data/source/bzs/db/protocol/tdap/client/nsDatabase.cpp +300 -173
  109. data/source/bzs/db/protocol/tdap/client/nsDatabase.h +53 -36
  110. data/source/bzs/db/protocol/tdap/client/nsTable.cpp +171 -128
  111. data/source/bzs/db/protocol/tdap/client/nsTable.h +121 -87
  112. data/source/bzs/db/protocol/tdap/client/pooledDatabaseManager.h +173 -0
  113. data/source/bzs/db/protocol/tdap/client/recordset.cpp +209 -0
  114. data/source/bzs/db/protocol/tdap/client/recordset.h +86 -0
  115. data/source/bzs/db/protocol/tdap/client/recordsetImple.h +596 -0
  116. data/source/bzs/db/protocol/tdap/client/request.h +227 -170
  117. data/source/bzs/db/protocol/tdap/client/serializer.cpp +1288 -0
  118. data/source/bzs/db/protocol/tdap/client/serializer.h +295 -0
  119. data/source/bzs/db/protocol/tdap/client/sharedData.cpp +9 -12
  120. data/source/bzs/db/protocol/tdap/client/sharedData.h +18 -16
  121. data/source/bzs/db/protocol/tdap/client/sqlBuilder.cpp +494 -473
  122. data/source/bzs/db/protocol/tdap/client/sqlBuilder.h +51 -53
  123. data/source/bzs/db/protocol/tdap/client/stringConverter.h +214 -148
  124. data/source/bzs/db/protocol/tdap/client/table.cpp +929 -1665
  125. data/source/bzs/db/protocol/tdap/client/table.h +413 -87
  126. data/source/bzs/db/protocol/tdap/client/trdboostapi.h +642 -534
  127. data/source/bzs/db/protocol/tdap/client/trdboostapiInternal.h +25 -40
  128. data/source/bzs/db/protocol/tdap/client/trdclcppautolink.h +11 -15
  129. data/source/bzs/db/protocol/tdap/client/trdormapi.h +378 -437
  130. data/source/bzs/db/protocol/tdap/client/trnsctcl.def +1 -1
  131. data/source/bzs/db/protocol/tdap/fieldComp.h +127 -0
  132. data/source/bzs/db/protocol/tdap/myDateTime.cpp +352 -345
  133. data/source/bzs/db/protocol/tdap/mysql/characterset.cpp +75 -78
  134. data/source/bzs/db/protocol/tdap/mysql/characterset.h +18 -19
  135. data/source/bzs/db/protocol/tdap/mysql/databaseSchema.cpp +216 -199
  136. data/source/bzs/db/protocol/tdap/mysql/databaseSchema.h +23 -14
  137. data/source/bzs/db/protocol/tdap/mysql/debuglog.cpp +354 -314
  138. data/source/bzs/db/protocol/tdap/mysql/debuglog.h +57 -47
  139. data/source/bzs/db/protocol/tdap/mysql/recordsetReader.h +905 -739
  140. data/source/bzs/db/protocol/tdap/mysql/request.h +152 -159
  141. data/source/bzs/db/protocol/tdap/mysql/tdapCommandExecuter.cpp +1044 -879
  142. data/source/bzs/db/protocol/tdap/mysql/tdapCommandExecuter.h +87 -81
  143. data/source/bzs/db/protocol/tdap/tdapRequest.h +162 -130
  144. data/source/bzs/db/protocol/tdap/tdapSchema.cpp +368 -166
  145. data/source/bzs/db/protocol/tdap/tdapSchema.h +702 -566
  146. data/source/bzs/db/protocol/tdap/tdapcapi.h +387 -353
  147. data/source/bzs/db/transactd/appBuilderImple.h +21 -20
  148. data/source/bzs/db/transactd/appModule.cpp +350 -98
  149. data/source/bzs/db/transactd/appModule.h +31 -37
  150. data/source/bzs/db/transactd/connManager.cpp +138 -135
  151. data/source/bzs/db/transactd/connManager.h +28 -21
  152. data/source/bzs/db/transactd/connectionRecord.h +39 -39
  153. data/source/bzs/db/transactd/transactd.cpp +217 -203
  154. data/source/bzs/env/boost_bcb_link.h +131 -0
  155. data/source/bzs/env/compiler.h +136 -79
  156. data/source/bzs/env/crosscompile.cpp +57 -57
  157. data/source/bzs/env/crosscompile.h +130 -115
  158. data/source/bzs/env/fileopen.h +7 -8
  159. data/source/bzs/env/mbcswchrLinux.cpp +4 -9
  160. data/source/bzs/env/mbcswchrLinux.h +37 -34
  161. data/source/bzs/env/tcharMinGW.h +59 -0
  162. data/source/bzs/env/tstring.h +90 -95
  163. data/source/bzs/example/changeSchema.cpp +22 -23
  164. data/source/bzs/example/changeSchema_c.cpp +22 -24
  165. data/source/bzs/example/connection_pool_c.cpp +49 -104
  166. data/source/bzs/example/createDatabase.cpp +40 -47
  167. data/source/bzs/example/createDatabase_c.cpp +38 -43
  168. data/source/bzs/example/deleteRecords.cpp +10 -15
  169. data/source/bzs/example/deleteRecords_c.cpp +10 -14
  170. data/source/bzs/example/dropDatabase.cpp +3 -9
  171. data/source/bzs/example/dropDatabase_c.cpp +5 -6
  172. data/source/bzs/example/insertRecords.cpp +37 -29
  173. data/source/bzs/example/insertRecords_c.cpp +19 -25
  174. data/source/bzs/example/ormap_c.cpp +621 -0
  175. data/source/bzs/example/queryData.cpp +371 -0
  176. data/source/bzs/example/queryData.h +16 -0
  177. data/source/bzs/example/query_c.cpp +109 -0
  178. data/source/bzs/example/readRecords.cpp +27 -27
  179. data/source/bzs/example/readRecords_c.cpp +25 -23
  180. data/source/bzs/example/updateRecords.cpp +16 -21
  181. data/source/bzs/example/updateRecords_c.cpp +8 -12
  182. data/source/bzs/example/update_with_transaction.cpp +21 -24
  183. data/source/bzs/example/update_with_transaction_c.cpp +12 -15
  184. data/source/bzs/example/useORMRecord.cpp +177 -0
  185. data/source/bzs/netsvc/client/tcpClient.cpp +167 -156
  186. data/source/bzs/netsvc/client/tcpClient.h +541 -489
  187. data/source/bzs/netsvc/server/IAppModule.h +119 -32
  188. data/source/bzs/netsvc/server/iserver.h +21 -23
  189. data/source/bzs/netsvc/server/serverCpt.cpp +421 -391
  190. data/source/bzs/netsvc/server/serverCpt.h +41 -43
  191. data/source/bzs/netsvc/server/serverPipe.cpp +580 -565
  192. data/source/bzs/netsvc/server/serverPipe.h +44 -45
  193. data/source/bzs/netsvc/server/serverTpool.cpp +333 -303
  194. data/source/bzs/netsvc/server/serverTpool.h +38 -43
  195. data/source/bzs/rtl/benchmark.cpp +91 -31
  196. data/source/bzs/rtl/benchmark.h +76 -22
  197. data/source/bzs/rtl/datetime.cpp +231 -233
  198. data/source/bzs/rtl/datetime.h +16 -16
  199. data/source/bzs/rtl/debuglog.cpp +48 -51
  200. data/source/bzs/rtl/debuglog.h +55 -44
  201. data/source/bzs/rtl/exception.h +55 -48
  202. data/source/bzs/rtl/stl_uty.cpp +27 -28
  203. data/source/bzs/rtl/stl_uty.h +28 -29
  204. data/source/bzs/rtl/stringBuffers.cpp +8 -6
  205. data/source/bzs/rtl/stringBuffers.h +16 -9
  206. data/source/bzs/rtl/strtrim.cpp +90 -91
  207. data/source/bzs/rtl/strtrim.h +14 -16
  208. data/source/bzs/test/tdclatl/bench_query_atl.js +647 -0
  209. data/source/bzs/test/tdclatl/bench_tdclatl.js +303 -303
  210. data/source/bzs/test/tdclatl/test_query_atl.js +669 -0
  211. data/source/bzs/test/tdclphp/bench.php +357 -0
  212. data/source/bzs/test/tdclphp/transactd_Test.php +907 -303
  213. data/source/bzs/test/tdclphp/transactd_blob_Test.php +21 -49
  214. data/source/bzs/test/tdclphp/transactd_datetime_Test.php +41 -75
  215. data/source/bzs/test/tdclphp/transactd_kanjischema_Test.php +23 -37
  216. data/source/bzs/test/tdclphp/transactd_pool_Test.php +120 -0
  217. data/source/bzs/test/tdclrb/bench_tdclcpp.rb +4 -6
  218. data/source/bzs/test/tdclrb/prepare.rb +15 -12
  219. data/source/bzs/test/tdclrb/transactd_blob_spec.rb +29 -32
  220. data/source/bzs/test/tdclrb/transactd_datetime_spec.rb +0 -29
  221. data/source/bzs/test/tdclrb/transactd_kanjischema_spec.rb +18 -19
  222. data/source/bzs/test/tdclrb/transactd_pool_spec.rb +107 -0
  223. data/source/bzs/test/tdclrb/transactd_spec.rb +734 -142
  224. data/source/bzs/test/transactdBench/query_bench.cpp +156 -0
  225. data/source/bzs/test/transactdBench/scaling_bench.cpp +265 -0
  226. data/source/bzs/test/transactdBench/transactdBench.cpp +107 -83
  227. data/source/bzs/test/transactdBench/transactdBench2.cpp +122 -83
  228. data/source/bzs/test/transactdBench/workerBase.cpp +5 -0
  229. data/source/bzs/test/transactdBench/workerBase.h +88 -0
  230. data/source/bzs/test/transactdBench/workerMySQLImple.h +333 -0
  231. data/source/bzs/test/transactdBench/workerTransactdImple.h +201 -0
  232. data/source/bzs/test/trdclengn/test_blob.cpp +121 -73
  233. data/source/bzs/test/trdclengn/test_trdclengn.cpp +1244 -426
  234. data/source/global/ormsrcgen/confParam.h +80 -0
  235. data/source/global/ormsrcgen/fieldName.cpp +77 -0
  236. data/source/global/ormsrcgen/fieldName.h +43 -0
  237. data/source/global/ormsrcgen/main.cpp +196 -0
  238. data/source/global/ormsrcgen/srcgen.cpp +763 -0
  239. data/source/global/ormsrcgen/srcgen.h +72 -0
  240. data/source/global/ormsrcgen/template/fieldNameList_sample.txt +2 -0
  241. data/source/global/ormsrcgen/template/ormDataClass_template.cpp +48 -0
  242. data/source/global/ormsrcgen/template/ormDataClass_template.h +34 -0
  243. data/source/global/ormsrcgen/template/ormMapClass_template.cpp +51 -0
  244. data/source/global/ormsrcgen/template/ormMapClass_template.h +62 -0
  245. data/source/global/ormsrcgen/template/template.cnf +38 -0
  246. data/source/global/querystmts/querystmts.cpp +237 -0
  247. data/source/global/tdclatl/ConnectParams.cpp +77 -0
  248. data/source/global/tdclatl/ConnectParams.h +70 -0
  249. data/source/global/tdclatl/Database.cpp +132 -128
  250. data/source/global/tdclatl/Database.h +60 -49
  251. data/source/global/tdclatl/DbDef.cpp +68 -64
  252. data/source/global/tdclatl/DbDef.h +36 -36
  253. data/source/global/tdclatl/Field.cpp +12 -17
  254. data/source/global/tdclatl/Field.h +15 -12
  255. data/source/global/tdclatl/FieldDef.cpp +75 -36
  256. data/source/global/tdclatl/FieldDef.h +38 -19
  257. data/source/global/tdclatl/FieldDefs.cpp +74 -0
  258. data/source/global/tdclatl/FieldDefs.h +56 -0
  259. data/source/global/tdclatl/FieldNames.cpp +99 -0
  260. data/source/global/tdclatl/FieldNames.h +66 -0
  261. data/source/global/tdclatl/Flags.cpp +75 -37
  262. data/source/global/tdclatl/Flags.h +13 -12
  263. data/source/global/tdclatl/GroupQuery.cpp +119 -0
  264. data/source/global/tdclatl/GroupQuery.h +65 -0
  265. data/source/global/tdclatl/KeyDef.cpp +15 -14
  266. data/source/global/tdclatl/KeyDef.h +20 -17
  267. data/source/global/tdclatl/KeySegment.cpp +13 -12
  268. data/source/global/tdclatl/PooledDbManager.cpp +223 -0
  269. data/source/global/tdclatl/PooledDbManager.h +76 -0
  270. data/source/global/tdclatl/QueryBase.cpp +206 -127
  271. data/source/global/tdclatl/QueryBase.h +55 -59
  272. data/source/global/tdclatl/Record.cpp +214 -0
  273. data/source/global/tdclatl/Record.h +96 -0
  274. data/source/global/tdclatl/Recordset.cpp +278 -0
  275. data/source/global/tdclatl/Recordset.h +83 -0
  276. data/source/global/tdclatl/RecordsetQuery.cpp +118 -0
  277. data/source/global/tdclatl/RecordsetQuery.h +126 -0
  278. data/source/global/tdclatl/Table.cpp +57 -60
  279. data/source/global/tdclatl/Table.h +32 -29
  280. data/source/global/tdclatl/TableDef.cpp +63 -62
  281. data/source/global/tdclatl/TableDef.h +20 -22
  282. data/source/global/tdclatl/TdVersion.cpp +3 -3
  283. data/source/global/tdclatl/TdVersion.h +15 -11
  284. data/source/global/tdclatl/_IDatabaseEvents_CP.h +99 -92
  285. data/source/global/tdclatl/activeTable.cpp +355 -0
  286. data/source/global/tdclatl/activeTable.h +79 -0
  287. data/source/global/tdclatl/dllmain.cpp +4 -3
  288. data/source/global/tdclatl/dllmain.h +7 -6
  289. data/source/global/tdclatl/keySegment.h +22 -18
  290. data/source/global/tdclatl/resource.h +0 -0
  291. data/source/global/tdclatl/stdafx.h +6 -4
  292. data/source/global/tdclatl/targetver.h +0 -1
  293. data/source/global/tdclatl/tdclatl.cpp +10 -5
  294. data/source/global/tdclatl/tdclatl.idl +530 -14
  295. data/source/linux/charsetConvert.h +78 -79
  296. data/source/linux/linuxTypes.h +9 -12
  297. data/source/linux/tchar.h +168 -166
  298. data/transactd.gemspec +24 -16
  299. metadata +98 -12
  300. data/bin/common/tdclc_32_1_2.dll +0 -0
  301. data/bin/common/tdclc_64_1_2.dll +0 -0
  302. data/build/tdclc/tdclc_32.cbproj +0 -173
  303. data/build/tdclcpp/tdclcpp_bcb_32.cbproj +0 -232
  304. data/build/tdclrb/GEM_VERSION +0 -3
  305. data/source/bzs/db/protocol/tdap/client/filter.cpp +0 -43
  306. data/source/bzs/example/useORM.cpp +0 -585
@@ -14,15 +14,17 @@
14
14
  GNU General Public License for more details.
15
15
 
16
16
  You should have received a copy of the GNU General Public License
17
- along with this program; if not, write to the Free Software
18
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17
+ along with this program; if not, write to the Free Software
18
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19
19
  02111-1307, USA.
20
20
  =================================================================*/
21
21
 
22
22
  #include <bzs/netsvc/server/IAppModule.h>
23
23
 
24
- #define PROTOCOL_TYPE_BTRV 0
25
- #define PROTOCOL_TYPE_HS 1
24
+ #define PROTOCOL_TYPE_BTRV 1
25
+ #define PROTOCOL_TYPE_HS 2
26
+ #define PROTOCOL_TYPE_ASYNCWRITE 4
27
+ #define PROTOCOL_TYPE_MEMBUFFER 8
26
28
 
27
29
  /** IAppModule factry
28
30
  * Implements IAppModule and Implements IMyPluginModule::create too.
@@ -30,26 +32,25 @@
30
32
  class IMyPluginModule : public bzs::netsvc::server::IAppModule
31
33
  {
32
34
  public:
33
- static bzs::netsvc::server::IAppModule* create(
34
- const boost::asio::ip::tcp::endpoint& endpoint
35
- , bzs::netsvc::server::iconnection* connection
36
- , bool tpool, int type);
35
+ static bzs::netsvc::server::IAppModule*
36
+ create(const boost::asio::ip::tcp::endpoint& endpoint,
37
+ bzs::netsvc::server::iconnection* connection, bool tpool, int type);
37
38
  };
38
39
 
39
40
  class transctionalIF : public bzs::netsvc::server::IAppModuleBuilder
40
41
  {
41
- bzs::netsvc::server::IAppModule* createSessionModule(
42
- const boost::asio::ip::tcp::endpoint& endpoint
43
- , bzs::netsvc::server::iconnection* connection
44
- , bool tpool)
45
- {
46
- return IMyPluginModule::create(endpoint, connection, tpool, m_type);
47
- }
48
-
49
- int m_type;
50
- public:
42
+ bzs::netsvc::server::IAppModule*
43
+ createSessionModule(const boost::asio::ip::tcp::endpoint& endpoint,
44
+ bzs::netsvc::server::iconnection* connection,
45
+ bool tpool)
46
+ {
47
+ return IMyPluginModule::create(endpoint, connection, tpool, m_type);
48
+ }
49
+
50
+ int m_type;
51
51
 
52
- transctionalIF(int type):m_type(type){};
52
+ public:
53
+ transctionalIF(int type) : m_type(type){};
53
54
  };
54
55
 
55
- #endif //BZS_DB_TRANSACTD_APPLICATIONIMPLE_H
56
+ #endif // BZS_DB_TRANSACTD_APPLICATIONIMPLE_H
@@ -1,5 +1,5 @@
1
1
  /*=================================================================
2
- Copyright (C) 2012 2013 BizStation Corp All rights reserved.
2
+ Copyright (C) 2012 2013 2014 BizStation Corp All rights reserved.
3
3
 
4
4
  This program is free software; you can redistribute it and/or
5
5
  modify it under the terms of the GNU General Public License
@@ -12,8 +12,8 @@
12
12
  GNU General Public License for more details.
13
13
 
14
14
  You should have received a copy of the GNU General Public License
15
- along with this program; if not, write to the Free Software
16
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
15
+ along with this program; if not, write to the Free Software
16
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17
17
  02111-1307, USA.
18
18
  =================================================================*/
19
19
 
@@ -29,15 +29,13 @@
29
29
  #include <bzs/db/protocol/hs/hsCommandExecuter.h>
30
30
  #endif
31
31
 
32
-
33
-
34
32
  using namespace bzs::netsvc::server;
35
33
 
36
- IAppModule* IMyPluginModule::create(const boost::asio::ip::tcp::endpoint& endpoint
37
- , iconnection* connection
38
- , bool tpool, int type)
34
+ IAppModule*
35
+ IMyPluginModule::create(const boost::asio::ip::tcp::endpoint& endpoint,
36
+ iconnection* connection, bool tpool, int type)
39
37
  {
40
- return new bzs::db::transactd::module(endpoint, connection, tpool, type);
38
+ return new bzs::db::transactd::module(endpoint, connection, tpool, type);
41
39
  }
42
40
 
43
41
  namespace bzs
@@ -47,137 +45,391 @@ namespace netsvc
47
45
  namespace server
48
46
  {
49
47
 
50
- boost::mutex modulesMutex;
51
- std::vector<IAppModule*> modules;
52
- using namespace bzs::netsvc::server;
48
+ boost::mutex modulesMutex;
49
+ std::vector<IAppModule*> modules;
50
+ using namespace bzs::netsvc::server;
53
51
 
54
- }//namespace server
55
- }//namespace netsvc
52
+ } // namespace server
53
+ } // namespace netsvc
56
54
 
57
55
  namespace db
58
56
  {
59
- using namespace protocol;
57
+ using namespace protocol;
60
58
  namespace transactd
61
59
  {
62
60
 
61
+ #define ASYNCWRITE_DATA_SIZE 16374 // 16384 - 10
62
+ #define ASYNC_BUFFER_SIZE (ASYNCWRITE_DATA_SIZE + 65536 + 6)
63
+
64
+ static const unsigned int segment_mark = 0xFFFFFFFF;
65
+
66
+ /* netAsyncWriter protocol description
67
+
68
+ segment_mark 4 system include RETBUF_EXT_RESERVE_SIZE
69
+ paramMask 2 system include RETBUF_EXT_RESERVE_SIZE
70
+ result 2 system include RETBUF_EXT_RESERVE_SIZE
71
+ rows 2 data
72
+ data... datalen data
73
+ datalen 4 system clients are no count this size
74
+ rows 2 system clients are no count this size
75
+ totallen 4 system include RETBUF_EXT_RESERVE_SIZE (not include
76
+ already sent)
77
+ */
78
+
79
+ class netAsyncWriter : public netWriter
80
+ {
81
+ iconnection* m_conn;
82
+ char* m_buf;
83
+ char* m_data;
84
+ size_t m_defBuffferPos;
85
+ unsigned short m_rows;
86
+
87
+ inline void doWrite()
88
+ {
89
+ unsigned int asyncDataSize = (unsigned int)(m_curPtr - m_data);
90
+ unsigned int size = ASYNCWRITE_DATA_SIZE;
91
+ if (asyncDataSize < ASYNCWRITE_DATA_SIZE)
92
+ size = asyncDataSize;
93
+ int offset = (int)(m_data - m_buf);
94
+
95
+ *((unsigned short*)(m_data - 2)) = (unsigned short)size;
96
+ m_conn->asyncWrite(m_buf, size + offset);
97
+
98
+ asyncDataSize -= size;
99
+ memmove(m_buf + 2, m_data + size, asyncDataSize);
100
+ m_data = m_buf + 2;
101
+ m_curPtr = m_data + asyncDataSize;
102
+ }
103
+
104
+ inline void writeEndMark()
105
+ {
106
+ memcpy(m_data, &segment_mark, 4);
107
+ unsigned short tmp = 4;
108
+ memcpy(m_data + tmp, &datalen, 4);
109
+ memcpy(m_data + tmp + 4, &m_rows, 2);
110
+ *((unsigned short*)(m_data - 2)) = tmp;
111
+ m_conn->asyncWrite(m_buf, tmp + 2 + 4 + 2);
112
+
113
+ m_curPtr = m_data;
114
+ }
115
+
116
+ public:
117
+ netAsyncWriter(iconnection* conn)
118
+ : netWriter(), m_conn(conn), m_defBuffferPos(0)
119
+ {
120
+ m_buf = new char[ASYNC_BUFFER_SIZE];
121
+ memcpy(m_buf, &segment_mark, sizeof(unsigned int));
122
+ m_data = m_buf + 2 + 4;
123
+ }
124
+
125
+ ~netAsyncWriter() { delete[] m_buf; }
126
+
127
+ void reset(IResultBuffer* retBuf, buffers* optData)
128
+ {
129
+ netWriter::reset(retBuf, optData);
130
+ m_defBuffferPos = 0;
131
+
132
+ memcpy(m_buf, &segment_mark, sizeof(unsigned int));
133
+ m_data = m_buf + 2 + 4;
134
+ m_curPtr = m_data;
135
+ }
136
+
137
+ void beginExt(bool includeBlob)
138
+ {
139
+ short result = 0;
140
+ ushort_td paramMask = getParamMask(includeBlob);
141
+
142
+ asyncWrite((const char*)(&paramMask), sizeof(ushort_td));
143
+ asyncWrite((const char*)(&result), sizeof(short));
144
+ asyncWrite((const char*)(&m_rows), sizeof(unsigned short));
145
+
146
+ datalen = sizeof(unsigned short); // rows space;
147
+ m_rows = 0;
148
+ }
149
+
150
+ bool asyncWrite(const char* p, unsigned int size,
151
+ eWriteMode mode = copyOnly)
152
+ {
153
+ unsigned int asyncDataSize = (unsigned int)(m_curPtr - m_data);
154
+
155
+ // client detabuffer orver flow check. don't use minus unsigned
156
+ // variables
157
+ if (m_clientBuffferSize < datalen + size)
158
+ return false;
159
+ datalen += size;
160
+ if (mode == curSeekOnly)
161
+ m_curPtr += size;
162
+ else if (mode == netwrite)
163
+ {
164
+ if (asyncDataSize > ASYNCWRITE_DATA_SIZE)
165
+ doWrite();
166
+ }
167
+ else if (mode == writeEnd)
168
+ {
169
+ if (asyncDataSize)
170
+ doWrite();
171
+ writeEndMark();
172
+ }
173
+ else
174
+ {
175
+ memcpy(m_curPtr, p, size);
176
+ m_curPtr += size;
177
+ }
178
+ return true;
179
+ }
180
+
181
+ // write to default buffer
182
+ bool write(const char* p, size_t size, eWriteMode mode = copyOnly)
183
+ {
184
+ if (mode >= netwrite)
185
+ return true;
186
+ if (resultBuffer->size() < m_defBuffferPos + size)
187
+ return false;
188
+
189
+ if (mode != curSeekOnly)
190
+ memcpy(resultBuffer->ptr() + m_defBuffferPos, p, size);
191
+ m_defBuffferPos += size;
192
+ datalen += size;
193
+ m_curPtr = resultBuffer->ptr() + m_defBuffferPos;
194
+ return true;
195
+ }
196
+
197
+ void incremetRows() { ++m_rows; }
198
+
199
+ size_t bufferSpace() const
200
+ {
201
+ return ASYNC_BUFFER_SIZE - (curPtr() - m_buf);
202
+ }
203
+
204
+ unsigned int resultLen() const
205
+ {
206
+ return (unsigned int)datalen + RETBUF_EXT_RESERVE_SIZE;
207
+ }
208
+
209
+ unsigned short getParamMask(bool includeBlob)
210
+ {
211
+ ushort_td paramMask =
212
+ P_MASK_DATA | P_MASK_FINALDATALEN | P_MASK_FINALRET;
213
+ if (!engine::mysql::table::noKeybufResult)
214
+ paramMask |= P_MASK_KEYBUF;
215
+
216
+ if (includeBlob)
217
+ paramMask |= P_MASK_BLOBBODY;
218
+ return paramMask;
219
+ }
220
+
221
+ /* Increment total deta size space only.
222
+ The header and contents are already sent
223
+ This space is include RETBUF_EXT_RESERVE_SIZE.
224
+ */
225
+ void writeHeadar(unsigned short paramMask, short result)
226
+ {
227
+ write(NULL, 4, curSeekOnly);
228
+ datalen -= 4;
229
+ }
230
+
231
+ /* allreadySent is async write size. writeHeadar size is not include.
232
+ */
233
+ unsigned int allreadySent() const { return resultLen() - 4; }
234
+ };
235
+
236
+ class netStdWriter : public netWriter
237
+ {
238
+ unsigned short* m_rowsPos;
239
+
240
+ public:
241
+ netStdWriter() : netWriter() {}
242
+
243
+ void beginExt(bool includeBlob)
244
+ {
245
+ m_curPtr = m_ptr + RETBUF_EXT_RESERVE_SIZE;
246
+ m_rowsPos = (unsigned short*)m_curPtr;
247
+ (*m_rowsPos) = 0;
248
+ datalen = sizeof(unsigned short); // rows space;
249
+ m_curPtr += 2;
250
+ }
251
+
252
+ unsigned int resultLen() const
253
+ {
254
+ return (unsigned int)(datalen + RETBUF_EXT_RESERVE_SIZE);
255
+ }
256
+
257
+ bool asyncWrite(const char* p, unsigned int size,
258
+ eWriteMode mode = copyOnly)
259
+ {
260
+ if (mode >= netwrite)
261
+ return true;
262
+ if (m_clientBuffferSize < datalen + size)
263
+ return false;
264
+
265
+ if (mode != curSeekOnly)
266
+ memcpy(m_curPtr, p, size);
267
+ m_curPtr += size;
268
+ datalen += size;
269
+
270
+ return true;
271
+ }
272
+
273
+ bool write(const char* p, size_t size, eWriteMode mode = copyOnly)
274
+ {
275
+ return asyncWrite(p, (unsigned int)size, mode);
276
+ }
277
+
278
+ void incremetRows() { ++(*m_rowsPos); }
279
+
280
+ unsigned short getParamMask(bool includeBlob)
281
+ {
282
+ ushort_td paramMask = (engine::mysql::table::noKeybufResult == false)
283
+ ? P_MASK_READ_EXT
284
+ : P_MASK_DATA | P_MASK_DATALEN;
285
+ if (includeBlob)
286
+ paramMask |= P_MASK_BLOBBODY;
287
+ return paramMask;
288
+ }
289
+
290
+ void writeHeadar(unsigned short paramMask, short result)
291
+ {
292
+ char* p = ptr() + sizeof(unsigned int); // 4
293
+ memcpy(p, (const char*)(&paramMask), sizeof(ushort_td)); // 2
294
+ p += sizeof(ushort_td);
295
+ memcpy(p, (const char*)(&result), sizeof(short_td)); // 2
296
+ p += sizeof(short_td);
297
+ memcpy(p, (const char*)&datalen, sizeof(uint_td)); // 4
298
+ }
299
+ unsigned int allreadySent() const { return 0; }
300
+ };
301
+
63
302
  /** The module created for every connection
64
- * In the case of a thread pool, thread termination processing is not performed by a destructor.
303
+ * In the case of a thread pool, thread termination processing is not performed
304
+ * by a destructor.
65
305
  */
66
- module::module(const boost::asio::ip::tcp::endpoint& endpoint
67
- , iconnection* connection, bool tpool, int type)
68
- :m_endpoint(endpoint), m_connection(connection), m_useThreadPool(tpool)
306
+ module::module(const boost::asio::ip::tcp::endpoint& endpoint,
307
+ iconnection* connection, bool tpool, int type)
308
+ : m_endpoint(endpoint), m_connection(connection), m_useThreadPool(tpool)
69
309
  {
70
- if (type == PROTOCOL_TYPE_BTRV)
71
- m_commandExecuter.reset(new protocol::tdap::mysql::commandExecuter((unsigned __int64)this));
310
+ if (type & PROTOCOL_TYPE_BTRV)
311
+ m_commandExecuter.reset(new protocol::tdap::mysql::commandExecuter(
312
+ (unsigned __int64) this));
72
313
  #ifdef USE_HANDLERSOCKET
73
- else if(type == PROTOCOL_TYPE_HS)
74
- m_commandExecuter.reset(new protocol::hs::commandExecuter((unsigned __int64)this));
314
+ else if (type & PROTOCOL_TYPE_HS)
315
+ m_commandExecuter.reset(
316
+ new protocol::hs::commandExecuter((unsigned __int64) this));
75
317
  #endif
76
- boost::mutex::scoped_lock lck(modulesMutex);
77
- modules.push_back(this);
318
+ boost::mutex::scoped_lock lck(modulesMutex);
319
+ modules.push_back(this);
320
+ if (type & PROTOCOL_TYPE_ASYNCWRITE)
321
+ m_nw = new netAsyncWriter(connection);
322
+ else
323
+ m_nw = new netStdWriter();
78
324
  }
79
325
 
80
326
  module::~module(void)
81
327
  {
82
- boost::mutex::scoped_lock lck(modulesMutex);
83
- modules.erase( find(modules.begin(), modules.end(), this));
84
- m_commandExecuter.reset();
85
- if (m_useThreadPool==false)
86
- {
87
- my_thread_end();
88
- endThread();
89
- }
328
+ boost::mutex::scoped_lock lck(modulesMutex);
329
+ modules.erase(find(modules.begin(), modules.end(), this));
330
+ delete m_nw;
331
+ m_commandExecuter.reset();
332
+ if (m_useThreadPool == false)
333
+ {
334
+ my_thread_end();
335
+ endThread();
336
+ }
90
337
  }
91
338
 
92
339
  void module::reset()
93
340
  {
94
341
  }
95
342
 
96
- /** It is called from the handler of async_read.
343
+ /** It is called from the handler of async_read.
97
344
  * A value is analyzed and it is answered whether a lead is completion.
98
- * @return Size required for a lead buffer is returned on the occasion of reading by addition.
99
- * When zero are returned, it is shown that it is not necessary to enlarge a buffer further.
345
+ * @return Size required for a lead buffer is returned on the occasion of
346
+ *reading by addition.
347
+ * When zero are returned, it is shown that it is not necessary to
348
+ *enlarge a buffer further.
100
349
  */
101
350
  size_t module::onRead(const char* data, size_t size, bool& complete)
102
351
  {
103
- m_readBuf = data;
104
- m_readSize = size;
105
- return m_commandExecuter->perseRequestEnd(data, size, complete);
352
+ m_readBuf = data;
353
+ m_readSize = size;
354
+ return m_commandExecuter->perseRequestEnd(data, size, complete);
106
355
  }
107
356
 
108
357
  size_t module::onAccept(char* message, size_t bufsize)
109
358
  {
110
- return m_commandExecuter->getAcceptMessage(message, bufsize);
359
+ return m_commandExecuter->getAcceptMessage(message, bufsize);
111
360
  }
112
361
 
113
- static const char* addressMasks[3] = {".0.0.0/255.0.0.0", ".0.0/255.255.0.0", ".0/255.255.255.0" };
362
+ static const char* addressMasks[3] = { ".0.0.0/255.0.0.0", ".0.0/255.255.0.0",
363
+ ".0/255.255.255.0" };
114
364
 
115
- char* addressClass(char* buf,int bufsize, const char *host, int type)
365
+ char* addressClass(char* buf, int bufsize, const char* host, int type)
116
366
  {
117
- strcpy_s(buf, bufsize, host);
118
- for (int i = 3; i >= type; i--)
119
- {
120
- char* p = strrchr(buf, '.');
121
- if (p == NULL) return buf;
122
- *p = 0x00;
123
- }
124
- strcat_s(buf, bufsize, addressMasks[type-1]);
125
- return buf;
367
+ strcpy_s(buf, bufsize, host);
368
+ for (int i = 3; i >= type; i--)
369
+ {
370
+ char* p = strrchr(buf, '.');
371
+ if (p == NULL)
372
+ return buf;
373
+ *p = 0x00;
374
+ }
375
+ strcat_s(buf, bufsize, addressMasks[type - 1]);
376
+ return buf;
126
377
  }
127
378
 
128
- bool isAclUser(const char *host, const char *user)
129
- {
130
- bool ret = is_acl_user(host, user);
131
- if (ret)return true;
132
- for (int i = 1; i <= 3; i++)
133
- {
134
- char buf[256];
135
- ret = is_acl_user( addressClass(buf, 256, host, i), user);
136
- if (ret)return true;
137
- }
138
- return false;
139
-
379
+ bool isAclUser(const char* host, const char* user)
380
+ {
381
+ bool ret = is_acl_user(host, user);
382
+ if (ret)
383
+ return true;
384
+ for (int i = 1; i <= 3; i++)
385
+ {
386
+ char buf[256];
387
+ ret = is_acl_user(addressClass(buf, 256, host, i), user);
388
+ if (ret)
389
+ return true;
390
+ }
391
+ return false;
140
392
  }
141
393
 
142
- bool module::checkHost( const char* hostCheckname)
143
- {
144
- std::string addr = m_endpoint.address().to_string();
145
- size_t pos = addr.find_last_of(":");
146
- if (pos != std::string::npos)
147
- addr = addr.substr(pos + 1);
148
-
149
- bool ret = true;
150
- if (!isAclUser(addr.c_str(), hostCheckname))
151
- {
152
- ret = isAclUser(m_endpoint.address().to_string().c_str(), hostCheckname);
153
- if (!ret && m_endpoint.address().is_v4())
154
- {
155
- if (addr == std::string("127.0.0.1"))
156
- ret = isAclUser("localhost", hostCheckname);
157
- }
158
- }
159
- return ret;
160
- }
394
+ bool module::checkHost(const char* hostCheckname)
395
+ {
396
+ std::string addr = m_endpoint.address().to_string();
397
+ size_t pos = addr.find_last_of(":");
398
+ if (pos != std::string::npos)
399
+ addr = addr.substr(pos + 1);
161
400
 
162
- int module::execute(char* result, size_t& size, netsvc::server::buffers* optionalData)
163
- {
164
- m_commandExecuter->parse(m_readBuf, m_readSize);
165
- boost::mutex::scoped_lock lck(m_mutex);
166
- if (m_useThreadPool)
167
- {
168
- int ret = m_commandExecuter->execute(result, size, optionalData);
169
- cleanup();
170
- return ret;
171
- }
172
- return m_commandExecuter->execute(result, size, optionalData);
401
+ bool ret = true;
402
+ if (!isAclUser(addr.c_str(), hostCheckname))
403
+ {
404
+ ret =
405
+ isAclUser(m_endpoint.address().to_string().c_str(), hostCheckname);
406
+ if (!ret && m_endpoint.address().is_v4())
407
+ {
408
+ if (addr == std::string("127.0.0.1"))
409
+ ret = isAclUser("localhost", hostCheckname);
410
+ }
411
+ }
412
+ return ret;
173
413
  }
174
414
 
175
- void module::disconnect()
415
+ int module::execute(netsvc::server::IResultBuffer& result, size_t& size,
416
+ netsvc::server::buffers* optionalData)
176
417
  {
177
- m_connection->close();
418
+ m_commandExecuter->parse(m_readBuf, m_readSize);
419
+ m_nw->reset(&result, optionalData);
420
+ boost::mutex::scoped_lock lck(m_mutex);
421
+ int ret = m_commandExecuter->execute(m_nw);
422
+ if (m_useThreadPool)
423
+ cleanup();
424
+ size = m_nw->datalen;
425
+ return ret;
178
426
  }
179
427
 
428
+ void module::disconnect()
429
+ {
430
+ m_connection->close();
431
+ }
180
432
 
181
- }//namespace transactd
182
- }//namespace db
183
- }//namespace bzs
433
+ } // namespace transactd
434
+ } // namespace db
435
+ } // namespace bzs
@@ -14,15 +14,14 @@
14
14
  GNU General Public License for more details.
15
15
 
16
16
  You should have received a copy of the GNU General Public License
17
- along with this program; if not, write to the Free Software
18
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17
+ along with this program; if not, write to the Free Software
18
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19
19
  02111-1307, USA.
20
20
  =================================================================*/
21
21
 
22
22
  #include <bzs/netsvc/server/IAppModule.h>
23
23
  #include <bzs/db/protocol/ICommandExecuter.h>
24
24
 
25
-
26
25
  class THD;
27
26
 
28
27
  namespace bzs
@@ -39,42 +38,37 @@ namespace transactd
39
38
  * -Execute client command.
40
39
  * -Anser of shutdown.
41
40
  */
42
- class module :public netsvc::server::IAppModule, private boost::noncopyable
41
+ class module : public netsvc::server::IAppModule, private boost::noncopyable
43
42
  {
44
- friend class connManager;
45
- mutable boost::mutex m_mutex;
46
- boost::shared_ptr<protocol::ICommandExecuter> m_commandExecuter;
47
- bool m_useThreadPool;
48
- const boost::asio::ip::tcp::endpoint m_endpoint;
49
- bzs::netsvc::server::iconnection* m_connection;
50
- const char* m_readBuf;
51
- size_t m_readSize;
52
- bool perseLineEnd(const char* p, size_t size)const;
53
- size_t onRead(const char* data, size_t size, bool& complete);
54
- size_t onAccept(char* message, size_t bufsize);
43
+ friend class connManager;
44
+ mutable boost::mutex m_mutex;
45
+ boost::shared_ptr<protocol::ICommandExecuter> m_commandExecuter;
46
+ const boost::asio::ip::tcp::endpoint m_endpoint;
47
+ bzs::netsvc::server::iconnection* m_connection;
48
+ const char* m_readBuf;
49
+ size_t m_readSize;
50
+ netsvc::server::netWriter* m_nw;
51
+ bool m_useThreadPool;
52
+ bool perseLineEnd(const char* p, size_t size) const;
53
+ size_t onRead(const char* data, size_t size, bool& complete);
54
+ size_t onAccept(char* message, size_t bufsize);
55
+
55
56
  public:
56
- module(const boost::asio::ip::tcp::endpoint& endpoint
57
- , bzs::netsvc::server::iconnection* connection
58
- , bool tpool,int type);
59
- ~module();
60
- void reset();
61
- int execute(char* result, size_t& size, netsvc::server::buffers* optionalData);
62
- void cleanup(){ m_commandExecuter->cleanup();};
63
- bool isShutDown(){return m_commandExecuter->isShutDown();}
64
- bool checkHost(const char* hostCheckname);
65
- void disconnect();
66
- boost::mutex& mutex()const{return m_mutex;};
67
-
57
+ module(const boost::asio::ip::tcp::endpoint& endpoint,
58
+ bzs::netsvc::server::iconnection* connection, bool tpool, int type);
59
+ ~module();
60
+ void reset();
61
+ int execute(netsvc::server::IResultBuffer& result, size_t& size,
62
+ netsvc::server::buffers* optionalData);
63
+ void cleanup() { m_commandExecuter->cleanup(); };
64
+ bool isShutDown() { return m_commandExecuter->isShutDown(); }
65
+ bool checkHost(const char* hostCheckname);
66
+ void disconnect();
67
+ boost::mutex& mutex() const { return m_mutex; };
68
68
  };
69
69
 
70
- }//namespace transactd
71
- }//namespace db
72
- }//namespace bzs
73
-
74
-
75
- #endif //BZS_DB_TRANSACTD_APPMODULE_H
76
-
77
-
78
-
79
-
70
+ } // namespace transactd
71
+ } // namespace db
72
+ } // namespace bzs
80
73
 
74
+ #endif // BZS_DB_TRANSACTD_APPMODULE_H