heroku-tokyotyrant 0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +504 -0
- data/README.rdoc +231 -0
- data/Rakefile +72 -0
- data/benchmarks/balancer.rb +101 -0
- data/benchmarks/bulk_db.rb +74 -0
- data/benchmarks/bulk_table.rb +87 -0
- data/benchmarks/db.rb +114 -0
- data/benchmarks/table.rb +161 -0
- data/ext/extconf.rb +43 -0
- data/ext/tokyo/bin/tcamgr +0 -0
- data/ext/tokyo/bin/tcamttest +0 -0
- data/ext/tokyo/bin/tcatest +0 -0
- data/ext/tokyo/bin/tcbmgr +0 -0
- data/ext/tokyo/bin/tcbmttest +0 -0
- data/ext/tokyo/bin/tcbtest +0 -0
- data/ext/tokyo/bin/tcfmgr +0 -0
- data/ext/tokyo/bin/tcfmttest +0 -0
- data/ext/tokyo/bin/tcftest +0 -0
- data/ext/tokyo/bin/tchmgr +0 -0
- data/ext/tokyo/bin/tchmttest +0 -0
- data/ext/tokyo/bin/tchtest +0 -0
- data/ext/tokyo/bin/tcrmgr +0 -0
- data/ext/tokyo/bin/tcrmttest +0 -0
- data/ext/tokyo/bin/tcrtest +0 -0
- data/ext/tokyo/bin/tctmgr +0 -0
- data/ext/tokyo/bin/tctmttest +0 -0
- data/ext/tokyo/bin/tcttest +0 -0
- data/ext/tokyo/bin/tcucodec +0 -0
- data/ext/tokyo/bin/tcumttest +0 -0
- data/ext/tokyo/bin/tcutest +0 -0
- data/ext/tokyo/bin/ttserver +0 -0
- data/ext/tokyo/bin/ttulmgr +0 -0
- data/ext/tokyo/bin/ttultest +0 -0
- data/ext/tokyo/include/tcadb.h +548 -0
- data/ext/tokyo/include/tcbdb.h +1101 -0
- data/ext/tokyo/include/tcfdb.h +858 -0
- data/ext/tokyo/include/tchdb.h +871 -0
- data/ext/tokyo/include/tcrdb.h +801 -0
- data/ext/tokyo/include/tctdb.h +1086 -0
- data/ext/tokyo/include/tculog.h +392 -0
- data/ext/tokyo/include/tcutil.h +4184 -0
- data/ext/tokyo/include/ttutil.h +494 -0
- data/ext/tokyo/lib/libtokyocabinet.9.4.0.dylib +0 -0
- data/ext/tokyo/lib/libtokyocabinet.9.dylib +0 -0
- data/ext/tokyo/lib/libtokyocabinet.a +0 -0
- data/ext/tokyo/lib/libtokyocabinet.dylib +0 -0
- data/ext/tokyo/lib/libtokyotyrant.3.22.0.dylib +0 -0
- data/ext/tokyo/lib/libtokyotyrant.3.dylib +0 -0
- data/ext/tokyo/lib/libtokyotyrant.a +0 -0
- data/ext/tokyo/lib/libtokyotyrant.dylib +0 -0
- data/ext/tokyo/lib/pkgconfig/tokyocabinet.pc +14 -0
- data/ext/tokyo/lib/pkgconfig/tokyotyrant.pc +14 -0
- data/ext/tokyo/lib/ttskeldir.bundle +0 -0
- data/ext/tokyo/lib/ttskelmock.bundle +0 -0
- data/ext/tokyo/lib/ttskelnull.bundle +0 -0
- data/ext/tokyo/lib/ttskelproxy.bundle +0 -0
- data/ext/tokyo/libexec/tcawmgr.cgi +0 -0
- data/ext/tokyo/sbin/ttservctl +163 -0
- data/ext/tokyo/share/man/man1/tcamgr.1 +97 -0
- data/ext/tokyo/share/man/man1/tcamttest.1 +35 -0
- data/ext/tokyo/share/man/man1/tcatest.1 +55 -0
- data/ext/tokyo/share/man/man1/tcbmgr.1 +125 -0
- data/ext/tokyo/share/man/man1/tcbmttest.1 +81 -0
- data/ext/tokyo/share/man/man1/tcbtest.1 +107 -0
- data/ext/tokyo/share/man/man1/tcfmgr.1 +98 -0
- data/ext/tokyo/share/man/man1/tcfmttest.1 +62 -0
- data/ext/tokyo/share/man/man1/tcftest.1 +73 -0
- data/ext/tokyo/share/man/man1/tchmgr.1 +110 -0
- data/ext/tokyo/share/man/man1/tchmttest.1 +85 -0
- data/ext/tokyo/share/man/man1/tchtest.1 +95 -0
- data/ext/tokyo/share/man/man1/tcrmgr.1 +164 -0
- data/ext/tokyo/share/man/man1/tcrmttest.1 +55 -0
- data/ext/tokyo/share/man/man1/tcrtest.1 +89 -0
- data/ext/tokyo/share/man/man1/tctmgr.1 +140 -0
- data/ext/tokyo/share/man/man1/tctmttest.1 +92 -0
- data/ext/tokyo/share/man/man1/tcttest.1 +105 -0
- data/ext/tokyo/share/man/man1/tcucodec.1 +162 -0
- data/ext/tokyo/share/man/man1/tcumttest.1 +41 -0
- data/ext/tokyo/share/man/man1/tcutest.1 +81 -0
- data/ext/tokyo/share/man/man1/ttserver.1 +84 -0
- data/ext/tokyo/share/man/man1/ttulmgr.1 +40 -0
- data/ext/tokyo/share/man/man1/ttultest.1 +16 -0
- data/ext/tokyo/share/man/man3/tcadb.3 +676 -0
- data/ext/tokyo/share/man/man3/tcbdb.3 +1355 -0
- data/ext/tokyo/share/man/man3/tcfdb.3 +975 -0
- data/ext/tokyo/share/man/man3/tchdb.3 +898 -0
- data/ext/tokyo/share/man/man3/tclist.3 +1 -0
- data/ext/tokyo/share/man/man3/tcmap.3 +1 -0
- data/ext/tokyo/share/man/man3/tcmdb.3 +1 -0
- data/ext/tokyo/share/man/man3/tcmpool.3 +1 -0
- data/ext/tokyo/share/man/man3/tcrdb.3 +1309 -0
- data/ext/tokyo/share/man/man3/tctdb.3 +1110 -0
- data/ext/tokyo/share/man/man3/tctree.3 +1 -0
- data/ext/tokyo/share/man/man3/tculog.3 +15 -0
- data/ext/tokyo/share/man/man3/tcutil.3 +4518 -0
- data/ext/tokyo/share/man/man3/tcxstr.3 +1 -0
- data/ext/tokyo/share/man/man3/tokyocabinet.3 +132 -0
- data/ext/tokyo/share/man/man3/ttutil.3 +14 -0
- data/ext/tokyo/share/man/man8/ttservctl.8 +37 -0
- data/ext/tokyo/share/tokyocabinet/COPYING +504 -0
- data/ext/tokyo/share/tokyocabinet/ChangeLog +1252 -0
- data/ext/tokyo/share/tokyocabinet/THANKS +12 -0
- data/ext/tokyo/share/tokyocabinet/doc/benchmark.pdf +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/common.css +211 -0
- data/ext/tokyo/share/tokyocabinet/doc/icon16.png +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/index.html +156 -0
- data/ext/tokyo/share/tokyocabinet/doc/index.ja.html +197 -0
- data/ext/tokyo/share/tokyocabinet/doc/logo-ja.png +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/logo.png +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/spex-en.html +7145 -0
- data/ext/tokyo/share/tokyocabinet/doc/spex-ja.html +7476 -0
- data/ext/tokyo/share/tokyocabinet/doc/tokyoproducts.pdf +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/tokyoproducts.ppt +0 -0
- data/ext/tokyo/share/tokyotyrant/COPYING +504 -0
- data/ext/tokyo/share/tokyotyrant/ChangeLog +578 -0
- data/ext/tokyo/share/tokyotyrant/THANKS +15 -0
- data/ext/tokyo/share/tokyotyrant/doc/common.css +211 -0
- data/ext/tokyo/share/tokyotyrant/doc/index.html +79 -0
- data/ext/tokyo/share/tokyotyrant/doc/spex.html +2264 -0
- data/ext/tokyo/share/tokyotyrant/ext/mapreduce.lua +57 -0
- data/ext/tokyo/share/tokyotyrant/ext/queue.lua +55 -0
- data/ext/tokyo/share/tokyotyrant/ext/senatus.lua +532 -0
- data/ext/tokyo/share/tokyotyrant/ext/usherette.lua +438 -0
- data/ext/tokyo_tyrant.c +147 -0
- data/ext/tokyo_tyrant.h +48 -0
- data/ext/tokyo_tyrant_db.c +227 -0
- data/ext/tokyo_tyrant_db.h +8 -0
- data/ext/tokyo_tyrant_module.c +453 -0
- data/ext/tokyo_tyrant_module.h +10 -0
- data/ext/tokyo_tyrant_query.c +226 -0
- data/ext/tokyo_tyrant_query.h +9 -0
- data/ext/tokyo_tyrant_table.c +319 -0
- data/ext/tokyo_tyrant_table.h +8 -0
- data/ext/tokyocabinet-1.4.41/COPYING +504 -0
- data/ext/tokyocabinet-1.4.41/ChangeLog +1252 -0
- data/ext/tokyocabinet-1.4.41/Makefile.in +825 -0
- data/ext/tokyocabinet-1.4.41/README +38 -0
- data/ext/tokyocabinet-1.4.41/THANKS +12 -0
- data/ext/tokyocabinet-1.4.41/bros/Makefile +133 -0
- data/ext/tokyocabinet-1.4.41/bros/bdbtest.c +438 -0
- data/ext/tokyocabinet-1.4.41/bros/cdbtest.c +219 -0
- data/ext/tokyocabinet-1.4.41/bros/cmpsqltctest.c +186 -0
- data/ext/tokyocabinet-1.4.41/bros/gdbmtest.c +216 -0
- data/ext/tokyocabinet-1.4.41/bros/mapreporter +72 -0
- data/ext/tokyocabinet-1.4.41/bros/maptest.cc +677 -0
- data/ext/tokyocabinet-1.4.41/bros/ndbmtest.c +204 -0
- data/ext/tokyocabinet-1.4.41/bros/qdbmtest.c +375 -0
- data/ext/tokyocabinet-1.4.41/bros/reporter +141 -0
- data/ext/tokyocabinet-1.4.41/bros/result.xls +0 -0
- data/ext/tokyocabinet-1.4.41/bros/sdbmtest.c +204 -0
- data/ext/tokyocabinet-1.4.41/bros/sqltest.c +404 -0
- data/ext/tokyocabinet-1.4.41/bros/tctest.c +748 -0
- data/ext/tokyocabinet-1.4.41/bros/tdbtest.c +205 -0
- data/ext/tokyocabinet-1.4.41/configure +7402 -0
- data/ext/tokyocabinet-1.4.41/configure.in +362 -0
- data/ext/tokyocabinet-1.4.41/doc/benchmark.pdf +0 -0
- data/ext/tokyocabinet-1.4.41/doc/common.css +211 -0
- data/ext/tokyocabinet-1.4.41/doc/icon16.png +0 -0
- data/ext/tokyocabinet-1.4.41/doc/index.html +156 -0
- data/ext/tokyocabinet-1.4.41/doc/index.ja.html +197 -0
- data/ext/tokyocabinet-1.4.41/doc/logo-ja.png +0 -0
- data/ext/tokyocabinet-1.4.41/doc/logo.png +0 -0
- data/ext/tokyocabinet-1.4.41/doc/spex-en.html +7145 -0
- data/ext/tokyocabinet-1.4.41/doc/spex-ja.html +7476 -0
- data/ext/tokyocabinet-1.4.41/doc/tokyoproducts.pdf +0 -0
- data/ext/tokyocabinet-1.4.41/doc/tokyoproducts.ppt +0 -0
- data/ext/tokyocabinet-1.4.41/example/Makefile +113 -0
- data/ext/tokyocabinet-1.4.41/example/tcadbex.c +55 -0
- data/ext/tokyocabinet-1.4.41/example/tcbdbex.c +64 -0
- data/ext/tokyocabinet-1.4.41/example/tcfdbex.c +60 -0
- data/ext/tokyocabinet-1.4.41/example/tchdbex.c +60 -0
- data/ext/tokyocabinet-1.4.41/example/tctchat.c +97 -0
- data/ext/tokyocabinet-1.4.41/example/tctchat.tmpl +141 -0
- data/ext/tokyocabinet-1.4.41/example/tctdbex.c +85 -0
- data/ext/tokyocabinet-1.4.41/example/tctsearch.c +95 -0
- data/ext/tokyocabinet-1.4.41/example/tctsearch.tmpl +122 -0
- data/ext/tokyocabinet-1.4.41/example/tcutilex.c +77 -0
- data/ext/tokyocabinet-1.4.41/f.tsv +2 -0
- data/ext/tokyocabinet-1.4.41/lab/calccomp +118 -0
- data/ext/tokyocabinet-1.4.41/lab/datechange +56 -0
- data/ext/tokyocabinet-1.4.41/lab/diffcheck +45 -0
- data/ext/tokyocabinet-1.4.41/lab/htmltotsv +102 -0
- data/ext/tokyocabinet-1.4.41/lab/magic +19 -0
- data/ext/tokyocabinet-1.4.41/lab/printenv.cgi +27 -0
- data/ext/tokyocabinet-1.4.41/lab/stepcount +26 -0
- data/ext/tokyocabinet-1.4.41/lab/stopwatch +61 -0
- data/ext/tokyocabinet-1.4.41/lab/tabcheck +43 -0
- data/ext/tokyocabinet-1.4.41/lab/wgettsv +239 -0
- data/ext/tokyocabinet-1.4.41/lab/widthcheck +57 -0
- data/ext/tokyocabinet-1.4.41/man/htmltoman +104 -0
- data/ext/tokyocabinet-1.4.41/man/tcadb.3 +676 -0
- data/ext/tokyocabinet-1.4.41/man/tcamgr.1 +97 -0
- data/ext/tokyocabinet-1.4.41/man/tcamttest.1 +35 -0
- data/ext/tokyocabinet-1.4.41/man/tcatest.1 +55 -0
- data/ext/tokyocabinet-1.4.41/man/tcbdb.3 +1355 -0
- data/ext/tokyocabinet-1.4.41/man/tcbmgr.1 +125 -0
- data/ext/tokyocabinet-1.4.41/man/tcbmttest.1 +81 -0
- data/ext/tokyocabinet-1.4.41/man/tcbtest.1 +107 -0
- data/ext/tokyocabinet-1.4.41/man/tcfdb.3 +975 -0
- data/ext/tokyocabinet-1.4.41/man/tcfmgr.1 +98 -0
- data/ext/tokyocabinet-1.4.41/man/tcfmttest.1 +62 -0
- data/ext/tokyocabinet-1.4.41/man/tcftest.1 +73 -0
- data/ext/tokyocabinet-1.4.41/man/tchdb.3 +898 -0
- data/ext/tokyocabinet-1.4.41/man/tchmgr.1 +110 -0
- data/ext/tokyocabinet-1.4.41/man/tchmttest.1 +85 -0
- data/ext/tokyocabinet-1.4.41/man/tchtest.1 +95 -0
- data/ext/tokyocabinet-1.4.41/man/tclist.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tcmap.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tcmdb.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tcmpool.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tctdb.3 +1110 -0
- data/ext/tokyocabinet-1.4.41/man/tctmgr.1 +140 -0
- data/ext/tokyocabinet-1.4.41/man/tctmttest.1 +92 -0
- data/ext/tokyocabinet-1.4.41/man/tctree.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tcttest.1 +105 -0
- data/ext/tokyocabinet-1.4.41/man/tcucodec.1 +162 -0
- data/ext/tokyocabinet-1.4.41/man/tcumttest.1 +41 -0
- data/ext/tokyocabinet-1.4.41/man/tcutest.1 +81 -0
- data/ext/tokyocabinet-1.4.41/man/tcutil.3 +4518 -0
- data/ext/tokyocabinet-1.4.41/man/tcxstr.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tokyocabinet.3 +132 -0
- data/ext/tokyocabinet-1.4.41/md5.c +381 -0
- data/ext/tokyocabinet-1.4.41/md5.h +101 -0
- data/ext/tokyocabinet-1.4.41/myconf.c +493 -0
- data/ext/tokyocabinet-1.4.41/myconf.h +549 -0
- data/ext/tokyocabinet-1.4.41/tcadb.c +4339 -0
- data/ext/tokyocabinet-1.4.41/tcadb.h +548 -0
- data/ext/tokyocabinet-1.4.41/tcamgr.c +1019 -0
- data/ext/tokyocabinet-1.4.41/tcamttest.c +542 -0
- data/ext/tokyocabinet-1.4.41/tcatest.c +1845 -0
- data/ext/tokyocabinet-1.4.41/tcawmgr.c +482 -0
- data/ext/tokyocabinet-1.4.41/tcbdb.c +4180 -0
- data/ext/tokyocabinet-1.4.41/tcbdb.h +1101 -0
- data/ext/tokyocabinet-1.4.41/tcbmgr.c +1012 -0
- data/ext/tokyocabinet-1.4.41/tcbmttest.c +1810 -0
- data/ext/tokyocabinet-1.4.41/tcbtest.c +2586 -0
- data/ext/tokyocabinet-1.4.41/tcfdb.c +2746 -0
- data/ext/tokyocabinet-1.4.41/tcfdb.h +858 -0
- data/ext/tokyocabinet-1.4.41/tcfmgr.c +786 -0
- data/ext/tokyocabinet-1.4.41/tcfmttest.c +1220 -0
- data/ext/tokyocabinet-1.4.41/tcftest.c +1695 -0
- data/ext/tokyocabinet-1.4.41/tchdb.c +5153 -0
- data/ext/tokyocabinet-1.4.41/tchdb.h +871 -0
- data/ext/tokyocabinet-1.4.41/tchmgr.c +842 -0
- data/ext/tokyocabinet-1.4.41/tchmttest.c +1757 -0
- data/ext/tokyocabinet-1.4.41/tchtest.c +2129 -0
- data/ext/tokyocabinet-1.4.41/tctdb.c +6199 -0
- data/ext/tokyocabinet-1.4.41/tctdb.h +1086 -0
- data/ext/tokyocabinet-1.4.41/tctmgr.c +1241 -0
- data/ext/tokyocabinet-1.4.41/tctmttest.c +1563 -0
- data/ext/tokyocabinet-1.4.41/tcttest.c +2062 -0
- data/ext/tokyocabinet-1.4.41/tcucodec.c +1357 -0
- data/ext/tokyocabinet-1.4.41/tcumttest.c +578 -0
- data/ext/tokyocabinet-1.4.41/tcutest.c +1875 -0
- data/ext/tokyocabinet-1.4.41/tcutil.c +10528 -0
- data/ext/tokyocabinet-1.4.41/tcutil.h +4184 -0
- data/ext/tokyocabinet-1.4.41/tokyocabinet.idl +336 -0
- data/ext/tokyocabinet-1.4.41/tokyocabinet.pc.in +14 -0
- data/ext/tokyotyrant-1.1.39/COPYING +504 -0
- data/ext/tokyotyrant-1.1.39/ChangeLog +578 -0
- data/ext/tokyotyrant-1.1.39/Makefile.in +365 -0
- data/ext/tokyotyrant-1.1.39/README +38 -0
- data/ext/tokyotyrant-1.1.39/THANKS +15 -0
- data/ext/tokyotyrant-1.1.39/configure +6979 -0
- data/ext/tokyotyrant-1.1.39/configure.in +300 -0
- data/ext/tokyotyrant-1.1.39/doc/common.css +211 -0
- data/ext/tokyotyrant-1.1.39/doc/index.html +79 -0
- data/ext/tokyotyrant-1.1.39/doc/spex.html +2264 -0
- data/ext/tokyotyrant-1.1.39/example/Makefile +68 -0
- data/ext/tokyotyrant-1.1.39/example/httptest.pl +88 -0
- data/ext/tokyotyrant-1.1.39/example/mcftest.pl +39 -0
- data/ext/tokyotyrant-1.1.39/example/mctest.pl +43 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbex +0 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbex.c +49 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbex.o +0 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbtblex +0 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbtblex.c +79 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbtblex.o +0 -0
- data/ext/tokyotyrant-1.1.39/ext/mapreduce.lua +57 -0
- data/ext/tokyotyrant-1.1.39/ext/queue.lua +55 -0
- data/ext/tokyotyrant-1.1.39/ext/senatus.lua +532 -0
- data/ext/tokyotyrant-1.1.39/ext/usherette.lua +438 -0
- data/ext/tokyotyrant-1.1.39/lab/datechange +56 -0
- data/ext/tokyotyrant-1.1.39/lab/diffcheck +45 -0
- data/ext/tokyotyrant-1.1.39/lab/fibonacci.lua +20 -0
- data/ext/tokyotyrant-1.1.39/lab/footprint.lua +67 -0
- data/ext/tokyotyrant-1.1.39/lab/highlow.lua +88 -0
- data/ext/tokyotyrant-1.1.39/lab/killdualmaster +12 -0
- data/ext/tokyotyrant-1.1.39/lab/rundualmaster +38 -0
- data/ext/tokyotyrant-1.1.39/lab/stepcount +26 -0
- data/ext/tokyotyrant-1.1.39/lab/tabcheck +43 -0
- data/ext/tokyotyrant-1.1.39/lab/ushrtregister.pl +55 -0
- data/ext/tokyotyrant-1.1.39/lab/widthcheck +57 -0
- data/ext/tokyotyrant-1.1.39/man/htmltoman +100 -0
- data/ext/tokyotyrant-1.1.39/man/tcrdb.3 +1309 -0
- data/ext/tokyotyrant-1.1.39/man/tcrmgr.1 +164 -0
- data/ext/tokyotyrant-1.1.39/man/tcrmttest.1 +55 -0
- data/ext/tokyotyrant-1.1.39/man/tcrtest.1 +89 -0
- data/ext/tokyotyrant-1.1.39/man/tculog.3 +15 -0
- data/ext/tokyotyrant-1.1.39/man/ttservctl.8 +37 -0
- data/ext/tokyotyrant-1.1.39/man/ttserver.1 +84 -0
- data/ext/tokyotyrant-1.1.39/man/ttulmgr.1 +40 -0
- data/ext/tokyotyrant-1.1.39/man/ttultest.1 +16 -0
- data/ext/tokyotyrant-1.1.39/man/ttutil.3 +14 -0
- data/ext/tokyotyrant-1.1.39/myconf.c +169 -0
- data/ext/tokyotyrant-1.1.39/myconf.h +408 -0
- data/ext/tokyotyrant-1.1.39/scrext.c +2394 -0
- data/ext/tokyotyrant-1.1.39/scrext.h +96 -0
- data/ext/tokyotyrant-1.1.39/tcrdb.c +2637 -0
- data/ext/tokyotyrant-1.1.39/tcrdb.h +801 -0
- data/ext/tokyotyrant-1.1.39/tcrmgr.c +1559 -0
- data/ext/tokyotyrant-1.1.39/tcrmttest.c +915 -0
- data/ext/tokyotyrant-1.1.39/tcrtest.c +1542 -0
- data/ext/tokyotyrant-1.1.39/tculog.c +1211 -0
- data/ext/tokyotyrant-1.1.39/tculog.h +392 -0
- data/ext/tokyotyrant-1.1.39/tokyotyrant.idl +143 -0
- data/ext/tokyotyrant-1.1.39/tokyotyrant.pc.in +14 -0
- data/ext/tokyotyrant-1.1.39/ttservctl +163 -0
- data/ext/tokyotyrant-1.1.39/ttserver.c +3583 -0
- data/ext/tokyotyrant-1.1.39/ttskeldir.c +141 -0
- data/ext/tokyotyrant-1.1.39/ttskelmock.c +64 -0
- data/ext/tokyotyrant-1.1.39/ttskelnull.c +79 -0
- data/ext/tokyotyrant-1.1.39/ttskelproxy.c +74 -0
- data/ext/tokyotyrant-1.1.39/ttulmgr.c +266 -0
- data/ext/tokyotyrant-1.1.39/ttultest.c +371 -0
- data/ext/tokyotyrant-1.1.39/ttutil.c +1510 -0
- data/ext/tokyotyrant-1.1.39/ttutil.h +494 -0
- data/lib/tokyo_tyrant/balancer.rb +189 -0
- data/spec/ext.lua +4 -0
- data/spec/plu_db.rb +538 -0
- data/spec/spec.rb +1 -0
- data/spec/spec_base.rb +17 -0
- data/spec/start_tyrants.sh +36 -0
- data/spec/stop_tyrants.sh +9 -0
- data/spec/tokyo_tyrant_balancer_db_spec.rb +160 -0
- data/spec/tokyo_tyrant_balancer_table_spec.rb +177 -0
- data/spec/tokyo_tyrant_query_spec.rb +159 -0
- data/spec/tokyo_tyrant_spec.rb +254 -0
- data/spec/tokyo_tyrant_table_spec.rb +301 -0
- metadata +402 -0
@@ -0,0 +1,392 @@
|
|
1
|
+
/*************************************************************************************************
|
2
|
+
* The update log API of Tokyo Tyrant
|
3
|
+
* Copyright (C) 2006-2009 Mikio Hirabayashi
|
4
|
+
* This file is part of Tokyo Tyrant.
|
5
|
+
* Tokyo Tyrant is free software; you can redistribute it and/or modify it under the terms of
|
6
|
+
* the GNU Lesser General Public License as published by the Free Software Foundation; either
|
7
|
+
* version 2.1 of the License or any later version. Tokyo Tyrant is distributed in the hope
|
8
|
+
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
9
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
10
|
+
* License for more details.
|
11
|
+
* You should have received a copy of the GNU Lesser General Public License along with Tokyo
|
12
|
+
* Tyrant; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
13
|
+
* Boston, MA 02111-1307 USA.
|
14
|
+
*************************************************************************************************/
|
15
|
+
|
16
|
+
|
17
|
+
#ifndef _TCULOG_H /* duplication check */
|
18
|
+
#define _TCULOG_H
|
19
|
+
|
20
|
+
#if defined(__cplusplus)
|
21
|
+
#define __TCULOG_CLINKAGEBEGIN extern "C" {
|
22
|
+
#define __TCULOG_CLINKAGEEND }
|
23
|
+
#else
|
24
|
+
#define __TCULOG_CLINKAGEBEGIN
|
25
|
+
#define __TCULOG_CLINKAGEEND
|
26
|
+
#endif
|
27
|
+
__TCULOG_CLINKAGEBEGIN
|
28
|
+
|
29
|
+
|
30
|
+
#include <ttutil.h>
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
/*************************************************************************************************
|
35
|
+
* API
|
36
|
+
*************************************************************************************************/
|
37
|
+
|
38
|
+
|
39
|
+
#define TCULSUFFIX ".ulog" /* suffix of update log files */
|
40
|
+
#define TCULMAGICNUM 0xc9 /* magic number of each command */
|
41
|
+
#define TCULMAGICNOP 0xca /* magic number of NOP command */
|
42
|
+
#define TCULRMTXNUM 31 /* number of mutexes of records */
|
43
|
+
|
44
|
+
typedef struct { /* type of structure for an update log */
|
45
|
+
pthread_mutex_t rmtxs[TCULRMTXNUM]; /* mutex for records */
|
46
|
+
pthread_rwlock_t rwlck; /* mutex for operation */
|
47
|
+
pthread_cond_t cnd; /* condition variable */
|
48
|
+
pthread_mutex_t wmtx; /* mutex for waiting condition */
|
49
|
+
char *base; /* path of the base directory */
|
50
|
+
uint64_t limsiz; /* limit size */
|
51
|
+
int max; /* number of maximum ID */
|
52
|
+
int fd; /* current file descriptor */
|
53
|
+
uint64_t size; /* current size */
|
54
|
+
void *aiocbs; /* AIO tasks */
|
55
|
+
int aiocbi; /* index of AIO tasks */
|
56
|
+
uint64_t aioend; /* end offset of AIO tasks */
|
57
|
+
} TCULOG;
|
58
|
+
|
59
|
+
typedef struct { /* type of structure for a log reader */
|
60
|
+
TCULOG *ulog; /* update log object */
|
61
|
+
uint64_t ts; /* beginning timestamp */
|
62
|
+
int num; /* number of current ID */
|
63
|
+
int fd; /* current file descriptor */
|
64
|
+
char *rbuf; /* record buffer */
|
65
|
+
int rsiz; /* size of the record buffer */
|
66
|
+
} TCULRD;
|
67
|
+
|
68
|
+
typedef struct { /* type of structure for a replication */
|
69
|
+
int fd; /* file descriptor */
|
70
|
+
TTSOCK *sock; /* socket object */
|
71
|
+
char *rbuf; /* record buffer */
|
72
|
+
int rsiz; /* size of the record buffer */
|
73
|
+
uint16_t mid; /* master server ID number */
|
74
|
+
} TCREPL;
|
75
|
+
|
76
|
+
|
77
|
+
/* Create an update log object.
|
78
|
+
The return value is the new update log object. */
|
79
|
+
TCULOG *tculognew(void);
|
80
|
+
|
81
|
+
|
82
|
+
/* Delete an update log object.
|
83
|
+
`ulog' specifies the update log object. */
|
84
|
+
void tculogdel(TCULOG *ulog);
|
85
|
+
|
86
|
+
|
87
|
+
/* Set AIO control of an update log object.
|
88
|
+
`ulog' specifies the update log object.
|
89
|
+
If successful, the return value is true, else, it is false. */
|
90
|
+
bool tculogsetaio(TCULOG *ulog);
|
91
|
+
|
92
|
+
|
93
|
+
/* Open files of an update log object.
|
94
|
+
`ulog' specifies the update log object.
|
95
|
+
`base' specifies the path of the base directory.
|
96
|
+
`limsiz' specifies the limit size of each file. If it is not more than 0, no limit is
|
97
|
+
specified.
|
98
|
+
If successful, the return value is true, else, it is false. */
|
99
|
+
bool tculogopen(TCULOG *ulog, const char *base, uint64_t limsiz);
|
100
|
+
|
101
|
+
|
102
|
+
/* Close files of an update log object.
|
103
|
+
`ulog' specifies the update log object.
|
104
|
+
If successful, the return value is true, else, it is false. */
|
105
|
+
bool tculogclose(TCULOG *ulog);
|
106
|
+
|
107
|
+
|
108
|
+
/* Get the mutex index of a record.
|
109
|
+
`ulog' specifies the update log object.
|
110
|
+
`kbuf' specifies the pointer to the region of the key.
|
111
|
+
`ksiz' specifies the size of the region of the key.
|
112
|
+
The return value is the mutex index of a record. */
|
113
|
+
int tculogrmtxidx(TCULOG *ulog, const char *kbuf, int ksiz);
|
114
|
+
|
115
|
+
|
116
|
+
/* Begin the critical section of an update log object.
|
117
|
+
`ulog' specifies the update log object.
|
118
|
+
`idx' specifies the index of the record lock. -1 means to lock all.
|
119
|
+
If successful, the return value is true, else, it is false. */
|
120
|
+
bool tculogbegin(TCULOG *ulog, int idx);
|
121
|
+
|
122
|
+
|
123
|
+
/* End the critical section of an update log object.
|
124
|
+
`ulog' specifies the update log object.
|
125
|
+
`idx' specifies the index of the record lock. -1 means to lock all.
|
126
|
+
If successful, the return value is true, else, it is false. */
|
127
|
+
bool tculogend(TCULOG *ulog, int idx);
|
128
|
+
|
129
|
+
|
130
|
+
/* Write a message into an update log object.
|
131
|
+
`ulog' specifies the update log object.
|
132
|
+
`ts' specifies the timestamp. If it is 0, the current time is specified.
|
133
|
+
`sid' specifies the origin server ID of the message.
|
134
|
+
`mid' specifies the master server ID of the message.
|
135
|
+
`ptr' specifies the pointer to the region of the message.
|
136
|
+
`size' specifies the size of the region.
|
137
|
+
If successful, the return value is true, else, it is false. */
|
138
|
+
bool tculogwrite(TCULOG *ulog, uint64_t ts, uint32_t sid, uint32_t mid,
|
139
|
+
const void *ptr, int size);
|
140
|
+
|
141
|
+
|
142
|
+
/* Create a log reader object.
|
143
|
+
`ulog' specifies the update log object.
|
144
|
+
`ts' specifies the beginning timestamp.
|
145
|
+
The return value is the new log reader object. */
|
146
|
+
TCULRD *tculrdnew(TCULOG *ulog, uint64_t ts);
|
147
|
+
|
148
|
+
|
149
|
+
/* Delete a log reader object.
|
150
|
+
`ulrd' specifies the log reader object. */
|
151
|
+
void tculrddel(TCULRD *ulrd);
|
152
|
+
|
153
|
+
|
154
|
+
/* Wait the next message is written.
|
155
|
+
`ulrd' specifies the log reader object. */
|
156
|
+
void tculrdwait(TCULRD *ulrd);
|
157
|
+
|
158
|
+
|
159
|
+
/* Read a message from a log reader object.
|
160
|
+
`ulrd' specifies the log reader object.
|
161
|
+
`sp' specifies the pointer to the variable into which the size of the region of the return
|
162
|
+
value is assigned.
|
163
|
+
`tsp' specifies the pointer to the variable into which the timestamp of the next message is
|
164
|
+
assigned.
|
165
|
+
`sidp' specifies the pointer to the variable into which the origin server ID of the next
|
166
|
+
message is assigned.
|
167
|
+
`midp' specifies the pointer to the variable into which the master server ID of the next
|
168
|
+
message is assigned.
|
169
|
+
If successful, the return value is the pointer to the region of the value of the next message.
|
170
|
+
`NULL' is returned if no record is to be read. */
|
171
|
+
const void *tculrdread(TCULRD *ulrd, int *sp, uint64_t *tsp, uint32_t *sidp, uint32_t *midp);
|
172
|
+
|
173
|
+
|
174
|
+
/* Store a record into an abstract database object.
|
175
|
+
`ulog' specifies the update log object.
|
176
|
+
`sid' specifies the origin server ID of the message.
|
177
|
+
`mid' specifies the master server ID of the message.
|
178
|
+
`adb' specifies the abstract database object.
|
179
|
+
`kbuf' specifies the pointer to the region of the key.
|
180
|
+
`ksiz' specifies the size of the region of the key.
|
181
|
+
`vbuf' specifies the pointer to the region of the value.
|
182
|
+
`vsiz' specifies the size of the region of the value.
|
183
|
+
If successful, the return value is true, else, it is false.
|
184
|
+
If a record with the same key exists in the database, it is overwritten. */
|
185
|
+
bool tculogadbput(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb,
|
186
|
+
const void *kbuf, int ksiz, const void *vbuf, int vsiz);
|
187
|
+
|
188
|
+
|
189
|
+
/* Store a new record into an abstract database object.
|
190
|
+
`ulog' specifies the update log object.
|
191
|
+
`sid' specifies the origin server ID of the message.
|
192
|
+
`mid' specifies the master server ID of the message.
|
193
|
+
`adb' specifies the abstract database object.
|
194
|
+
`kbuf' specifies the pointer to the region of the key.
|
195
|
+
`ksiz' specifies the size of the region of the key.
|
196
|
+
`vbuf' specifies the pointer to the region of the value.
|
197
|
+
`vsiz' specifies the size of the region of the value.
|
198
|
+
If successful, the return value is true, else, it is false.
|
199
|
+
If a record with the same key exists in the database, this function has no effect. */
|
200
|
+
bool tculogadbputkeep(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb,
|
201
|
+
const void *kbuf, int ksiz, const void *vbuf, int vsiz);
|
202
|
+
|
203
|
+
|
204
|
+
/* Concatenate a value at the end of the existing record in an abstract database object.
|
205
|
+
`ulog' specifies the update log object.
|
206
|
+
`sid' specifies the origin server ID of the message.
|
207
|
+
`mid' specifies the master server ID of the message.
|
208
|
+
`adb' specifies the abstract database object.
|
209
|
+
`kbuf' specifies the pointer to the region of the key.
|
210
|
+
`ksiz' specifies the size of the region of the key.
|
211
|
+
`vbuf' specifies the pointer to the region of the value.
|
212
|
+
`vsiz' specifies the size of the region of the value.
|
213
|
+
If successful, the return value is true, else, it is false.
|
214
|
+
If there is no corresponding record, a new record is created. */
|
215
|
+
bool tculogadbputcat(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb,
|
216
|
+
const void *kbuf, int ksiz, const void *vbuf, int vsiz);
|
217
|
+
|
218
|
+
|
219
|
+
/* Concatenate a value at the end of the existing record and shift it to the left.
|
220
|
+
`ulog' specifies the update log object.
|
221
|
+
`sid' specifies the origin server ID of the message.
|
222
|
+
`mid' specifies the master server ID of the message.
|
223
|
+
`adb' specifies the abstract database object.
|
224
|
+
`kbuf' specifies the pointer to the region of the key.
|
225
|
+
`ksiz' specifies the size of the region of the key.
|
226
|
+
`vbuf' specifies the pointer to the region of the value.
|
227
|
+
`vsiz' specifies the size of the region of the value.
|
228
|
+
`width' specifies the width of the record.
|
229
|
+
If successful, the return value is true, else, it is false.
|
230
|
+
If there is no corresponding record, a new record is created. */
|
231
|
+
bool tculogadbputshl(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb,
|
232
|
+
const void *kbuf, int ksiz, const void *vbuf, int vsiz, int width);
|
233
|
+
|
234
|
+
|
235
|
+
/* Remove a record of an abstract database object.
|
236
|
+
`ulog' specifies the update log object.
|
237
|
+
`sid' specifies the origin server ID of the message.
|
238
|
+
`mid' specifies the master server ID of the message.
|
239
|
+
`adb' specifies the abstract database object.
|
240
|
+
`kbuf' specifies the pointer to the region of the key.
|
241
|
+
`ksiz' specifies the size of the region of the key.
|
242
|
+
If successful, the return value is true, else, it is false. */
|
243
|
+
bool tculogadbout(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb,
|
244
|
+
const void *kbuf, int ksiz);
|
245
|
+
|
246
|
+
|
247
|
+
/* Add an integer to a record in an abstract database object.
|
248
|
+
`ulog' specifies the update log object.
|
249
|
+
`sid' specifies the origin server ID of the message.
|
250
|
+
`mid' specifies the master server ID of the message.
|
251
|
+
`adb' specifies the abstract database object connected as a writer.
|
252
|
+
`kbuf' specifies the pointer to the region of the key.
|
253
|
+
`ksiz' specifies the size of the region of the key.
|
254
|
+
`num' specifies the additional value.
|
255
|
+
If successful, the return value is the summation value, else, it is `INT_MIN'.
|
256
|
+
If the corresponding record exists, the value is treated as an integer and is added to. If no
|
257
|
+
record corresponds, a new record of the additional value is stored. */
|
258
|
+
int tculogadbaddint(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb,
|
259
|
+
const void *kbuf, int ksiz, int num);
|
260
|
+
|
261
|
+
|
262
|
+
/* Add a real number to a record in an abstract database object.
|
263
|
+
`ulog' specifies the update log object.
|
264
|
+
`sid' specifies the origin server ID of the message.
|
265
|
+
`mid' specifies the master server ID of the message.
|
266
|
+
`adb' specifies the abstract database object connected as a writer.
|
267
|
+
`kbuf' specifies the pointer to the region of the key.
|
268
|
+
`ksiz' specifies the size of the region of the key.
|
269
|
+
`num' specifies the additional value.
|
270
|
+
If successful, the return value is the summation value, else, it is `NAN'.
|
271
|
+
If the corresponding record exists, the value is treated as a real number and is added to. If
|
272
|
+
no record corresponds, a new record of the additional value is stored. */
|
273
|
+
double tculogadbadddouble(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb,
|
274
|
+
const void *kbuf, int ksiz, double num);
|
275
|
+
|
276
|
+
|
277
|
+
/* Synchronize updated contents of an abstract database object with the file and the device.
|
278
|
+
`ulog' specifies the update log object.
|
279
|
+
`sid' specifies the origin server ID of the message.
|
280
|
+
`mid' specifies the master server ID of the message.
|
281
|
+
`adb' specifies the abstract database object.
|
282
|
+
If successful, the return value is true, else, it is false. */
|
283
|
+
bool tculogadbsync(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb);
|
284
|
+
|
285
|
+
|
286
|
+
/* Optimize the storage of an abstract database object.
|
287
|
+
`ulog' specifies the update log object.
|
288
|
+
`sid' specifies the origin server ID of the message.
|
289
|
+
`mid' specifies the master server ID of the message.
|
290
|
+
`adb' specifies the abstract database object.
|
291
|
+
`params' specifies the string of the tuning parameters, which works as with the tuning
|
292
|
+
of parameters the function `tcadbopen'. If it is `NULL', it is not used.
|
293
|
+
If successful, the return value is true, else, it is false. */
|
294
|
+
bool tculogadboptimize(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb, const char *params);
|
295
|
+
|
296
|
+
|
297
|
+
/* Remove all records of an abstract database object.
|
298
|
+
`ulog' specifies the update log object.
|
299
|
+
`sid' specifies the origin server ID of the message.
|
300
|
+
`mid' specifies the master server ID of the message.
|
301
|
+
`adb' specifies the abstract database object.
|
302
|
+
If successful, the return value is true, else, it is false. */
|
303
|
+
bool tculogadbvanish(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb);
|
304
|
+
|
305
|
+
|
306
|
+
/* Call a versatile function for miscellaneous operations of an abstract database object.
|
307
|
+
`ulog' specifies the update log object.
|
308
|
+
`sid' specifies the origin server ID of the message.
|
309
|
+
`mid' specifies the master server ID of the message.
|
310
|
+
`adb' specifies the abstract database object.
|
311
|
+
`name' specifies the name of the function.
|
312
|
+
`args' specifies a list object containing arguments.
|
313
|
+
If successful, the return value is a list object of the result. `NULL' is returned on failure.
|
314
|
+
All databases support "putlist", "outlist", and "getlist". "putdup" is to store records. It
|
315
|
+
receives keys and values one after the other, and returns an empty list. "outlist" is to
|
316
|
+
remove records. It receives keys, and returns an empty list. "getlist" is to retrieve
|
317
|
+
records. It receives keys, and returns values. Because the object of the return value is
|
318
|
+
created with the function `tclistnew', it should be deleted with the function `tclistdel' when
|
319
|
+
it is no longer in use. */
|
320
|
+
TCLIST *tculogadbmisc(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb,
|
321
|
+
const char *name, const TCLIST *args);
|
322
|
+
|
323
|
+
|
324
|
+
/* Restore an abstract database object.
|
325
|
+
`adb' specifies the abstract database object.
|
326
|
+
`path' specifies the path of the update log directory.
|
327
|
+
`ts' specifies the beginning time stamp.
|
328
|
+
`con' specifies whether consistency checking is performed.
|
329
|
+
`ulog' specifies the update log object.
|
330
|
+
If successful, the return value is true, else, it is false. */
|
331
|
+
bool tculogadbrestore(TCADB *adb, const char *path, uint64_t ts, bool con, TCULOG *ulog);
|
332
|
+
|
333
|
+
|
334
|
+
/* Redo an update log message.
|
335
|
+
`adb' specifies the abstract database object.
|
336
|
+
`ptr' specifies the pointer to the region of the message.
|
337
|
+
`size' specifies the size of the region.
|
338
|
+
`ulog' specifies the update log object.
|
339
|
+
`sid' specifies the origin server ID of the message.
|
340
|
+
`mid' specifies the master server ID of the message.
|
341
|
+
`cp' specifies the pointer to the variable into which the result of consistency checking is
|
342
|
+
assigned.
|
343
|
+
If successful, the return value is true, else, it is false. */
|
344
|
+
bool tculogadbredo(TCADB *adb, const char *ptr, int size, TCULOG *ulog,
|
345
|
+
uint32_t sid, uint32_t mid, bool *cp);
|
346
|
+
|
347
|
+
|
348
|
+
/* Create a replication object.
|
349
|
+
The return value is the new replicatoin object. */
|
350
|
+
TCREPL *tcreplnew(void);
|
351
|
+
|
352
|
+
|
353
|
+
/* Delete a replication object.
|
354
|
+
`repl' specifies the replication object. */
|
355
|
+
void tcrepldel(TCREPL *repl);
|
356
|
+
|
357
|
+
|
358
|
+
/* Open a replication object.
|
359
|
+
`repl' specifies the replication object.
|
360
|
+
`host' specifies the name or the address of the server.
|
361
|
+
`port' specifies the port number.
|
362
|
+
`sid' specifies the server ID of self messages.
|
363
|
+
If successful, the return value is true, else, it is false. */
|
364
|
+
bool tcreplopen(TCREPL *repl, const char *host, int port, uint64_t ts, uint32_t sid);
|
365
|
+
|
366
|
+
|
367
|
+
/* Close a remote database object.
|
368
|
+
`rdb' specifies the remote database object.
|
369
|
+
If successful, the return value is true, else, it is false. */
|
370
|
+
bool tcreplclose(TCREPL *repl);
|
371
|
+
|
372
|
+
|
373
|
+
/* Read a message from a replication object.
|
374
|
+
`repl' specifies the replication object.
|
375
|
+
`sp' specifies the pointer to the variable into which the size of the region of the return
|
376
|
+
value is assigned.
|
377
|
+
`tsp' specifies the pointer to the variable into which the timestamp of the next message is
|
378
|
+
assigned.
|
379
|
+
`sidp' specifies the pointer to the variable into which the origin server ID of the next
|
380
|
+
message is assigned.
|
381
|
+
If successful, the return value is the pointer to the region of the value of the next message.
|
382
|
+
`NULL' is returned if no record is to be read. Empty string is returned when the no-operation
|
383
|
+
command has been received. */
|
384
|
+
const char *tcreplread(TCREPL *repl, int *sp, uint64_t *tsp, uint32_t *sidp);
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
__TCULOG_CLINKAGEEND
|
389
|
+
#endif /* duplication check */
|
390
|
+
|
391
|
+
|
392
|
+
/* END OF FILE */
|
@@ -0,0 +1,143 @@
|
|
1
|
+
/*************************************************************************************************
|
2
|
+
* IDL for bindings of scripting languages
|
3
|
+
* Copyright (C) 2006-2009 Mikio Hirabayashi
|
4
|
+
* This file is part of Tokyo Tyrant.
|
5
|
+
* Tokyo Tyrant is free software; you can redistribute it and/or modify it under the terms of
|
6
|
+
* the GNU Lesser General Public License as published by the Free Software Foundation; either
|
7
|
+
* version 2.1 of the License or any later version. Tokyo Tyrant is distributed in the hope
|
8
|
+
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
9
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
10
|
+
* License for more details.
|
11
|
+
* You should have received a copy of the GNU Lesser General Public License along with Tokyo
|
12
|
+
* Tyrant; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
13
|
+
* Boston, MA 02111-1307 USA.
|
14
|
+
*************************************************************************************************/
|
15
|
+
|
16
|
+
|
17
|
+
/**
|
18
|
+
* namespace of Tokyo Tyrant
|
19
|
+
*/
|
20
|
+
module TokyoTyrant {
|
21
|
+
//----------------------------------------------------------------
|
22
|
+
// list of strings (substituted for by the native mechanism)
|
23
|
+
//----------------------------------------------------------------
|
24
|
+
interface List {
|
25
|
+
string get(in long index);
|
26
|
+
};
|
27
|
+
//----------------------------------------------------------------
|
28
|
+
// map of strings (substituted for by the native mechanism)
|
29
|
+
//----------------------------------------------------------------
|
30
|
+
interface Map {
|
31
|
+
string get(in string key);
|
32
|
+
};
|
33
|
+
//----------------------------------------------------------------
|
34
|
+
// the error codes
|
35
|
+
//----------------------------------------------------------------
|
36
|
+
interface ECODE {
|
37
|
+
const long ESUCCESS = 0;
|
38
|
+
const long EINVALID = 1;
|
39
|
+
const long ENOHOST = 2;
|
40
|
+
const long EREFUSED = 3;
|
41
|
+
const long ESEND = 4;
|
42
|
+
const long ERECV = 5;
|
43
|
+
const long EKEEP = 6;
|
44
|
+
const long ENOREC = 7;
|
45
|
+
const long EMISC = 9999;
|
46
|
+
long ecode();
|
47
|
+
string errmsg(in long ecode);
|
48
|
+
};
|
49
|
+
//----------------------------------------------------------------
|
50
|
+
// the remove database API
|
51
|
+
//----------------------------------------------------------------
|
52
|
+
interface RDB :ECODE {
|
53
|
+
const long XOLCKREC = 1 << 0;
|
54
|
+
const long XOLCKGLB = 1 << 1;
|
55
|
+
const long MONOULOG = 1 << 0;
|
56
|
+
boolean open(in string host, in long port);
|
57
|
+
boolean close();
|
58
|
+
boolean put(in string key, in string value);
|
59
|
+
boolean putkeep(in string key, in string value);
|
60
|
+
boolean putcat(in string key, in string value);
|
61
|
+
boolean putshl(in string key, in string value, in long width);
|
62
|
+
boolean putnr(in string key, in string value);
|
63
|
+
boolean out(in string key);
|
64
|
+
string get(in string key);
|
65
|
+
long mget(inout Map recs);
|
66
|
+
long vsiz(in string key);
|
67
|
+
boolean iterinit();
|
68
|
+
string iternext();
|
69
|
+
List fwmkeys(in string prefix, in long max);
|
70
|
+
long addint(in string key, in long num);
|
71
|
+
double adddouble(in string key, in double num);
|
72
|
+
string ext(in string name, in string key, in string value, in long opts);
|
73
|
+
boolean sync();
|
74
|
+
boolean optimize(in string params);
|
75
|
+
boolean vanish();
|
76
|
+
boolean copy(in string path);
|
77
|
+
long long rnum();
|
78
|
+
long long size();
|
79
|
+
string stat();
|
80
|
+
List misc(in string name, in List args, in long opts);
|
81
|
+
};
|
82
|
+
//----------------------------------------------------------------
|
83
|
+
// the table extension API
|
84
|
+
//----------------------------------------------------------------
|
85
|
+
interface RDBTBL :RDB {
|
86
|
+
const long ITLEXICAL = 0;
|
87
|
+
const long ITDECIMAL = 1;
|
88
|
+
const long ITTOKEN = 2;
|
89
|
+
const long ITQGRAM = 3;
|
90
|
+
const long ITOPT = 9998;
|
91
|
+
const long ITVOID = 9999;
|
92
|
+
const long ITKEEP = 1 << 24;
|
93
|
+
boolean put(in string pkey, in Map cols);
|
94
|
+
boolean putkeep(in string pkey, in Map cols);
|
95
|
+
boolean putcat(in string pkey, in Map cols);
|
96
|
+
boolean out(in string pkey);
|
97
|
+
Map get(in string pkey);
|
98
|
+
boolean setindex(in string name, in long type);
|
99
|
+
long long genuid();
|
100
|
+
};
|
101
|
+
interface RDBQRY {
|
102
|
+
const long QCSTREQ = 0;
|
103
|
+
const long QCSTRINC = 1;
|
104
|
+
const long QCSTRBW = 2;
|
105
|
+
const long QCSTREW = 3;
|
106
|
+
const long QCSTRAND = 4;
|
107
|
+
const long QCSTROR = 5;
|
108
|
+
const long QCSTROREQ = 6;
|
109
|
+
const long QCSTRRX = 7;
|
110
|
+
const long QCNUMEQ = 8;
|
111
|
+
const long QCNUMGT = 9;
|
112
|
+
const long QCNUMGE = 10;
|
113
|
+
const long QCNUMLT = 11;
|
114
|
+
const long QCNUMLE = 12;
|
115
|
+
const long QCNUMBT = 13;
|
116
|
+
const long QCNUMOREQ = 14;
|
117
|
+
const long QCFTSPH = 15;
|
118
|
+
const long QCFTSAND = 16;
|
119
|
+
const long QCFTSOR = 17;
|
120
|
+
const long QCFTSEX = 18;
|
121
|
+
const long QCNEGATE = 1 << 24;
|
122
|
+
const long QCNOIDX = 1 << 25;
|
123
|
+
const long QOSTRASC = 0;
|
124
|
+
const long QOSTRDESC = 1;
|
125
|
+
const long QONUMASC = 2;
|
126
|
+
const long QONUMDESC = 3;
|
127
|
+
const long MSUNION = 0;
|
128
|
+
const long MSISECT = 1;
|
129
|
+
const long MSDIFF = 2;
|
130
|
+
void addcond(in string name, in long op, in string expr);
|
131
|
+
void setorder(in string name, in long type);
|
132
|
+
void setlimit(in long max, in long skip);
|
133
|
+
List search();
|
134
|
+
boolean searchout();
|
135
|
+
string hint();
|
136
|
+
typedef sequence<RDBQRY> QueryList;
|
137
|
+
List metasearch(in QueryList qrys, in long type);
|
138
|
+
};
|
139
|
+
};
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
/* END OF FILE */
|