亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tcbdb.h

?? 高性能嵌入式數據庫在高并發的環境下使用最好是64位系統比較好
?? H
?? 第 1 頁 / 共 4 頁
字號:
/************************************************************************************************* * The B+ tree database API of Tokyo Cabinet *                                                      Copyright (C) 2006-2008 Mikio Hirabayashi * This file is part of Tokyo Cabinet. * Tokyo Cabinet is free software; you can redistribute it and/or modify it under the terms of * the GNU Lesser General Public License as published by the Free Software Foundation; either * version 2.1 of the License or any later version.  Tokyo Cabinet is distributed in the hope * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public * License for more details. * You should have received a copy of the GNU Lesser General Public License along with Tokyo * Cabinet; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307 USA. *************************************************************************************************/#ifndef _TCBDB_H                         /* duplication check */#define _TCBDB_H#if defined(__cplusplus)#define __TCBDB_CLINKAGEBEGIN extern "C" {#define __TCBDB_CLINKAGEEND }#else#define __TCBDB_CLINKAGEBEGIN#define __TCBDB_CLINKAGEEND#endif__TCBDB_CLINKAGEBEGIN#include <stdlib.h>#include <stdbool.h>#include <stdint.h>#include <time.h>#include <limits.h>#include <math.h>#include <tcutil.h>#include <tchdb.h>/************************************************************************************************* * API *************************************************************************************************//* type of the pointer to a comparison function.   `aptr' specifies the pointer to the region of one key.   `asiz' specifies the size of the region of one key.   `bptr' specifies the pointer to the region of the other key.   `bsiz' specifies the size of the region of the other key.   `op' specifies the pointer to the optional opaque object.   The return value is positive if the former is big, negative if the latter is big, 0 if both   are equivalent. */typedef int (*BDBCMP)(const char *aptr, int asiz, const char *bptr, int bsiz, void *op);/* type of the pointer to a encoding or decoding function.   `ptr' specifies the pointer to the region.   `size' specifies the size of the region.   `sp' specifies the pointer to the variable into which the size of the region of the return   value is assigned.   `op' specifies the pointer to the optional opaque object.   If successful, the return value is the pointer to the result object allocated with `malloc'   call, else, it is `NULL'. */typedef void *(*BDBCODEC)(const void *ptr, int size, int *sp, void *op);typedef struct {                         /* type of structure for a B+ tree database */  void *mmtx;                            /* mutex for method */  void *cmtx;                            /* mutex for cache */  void *tmtx;                            /* mutex for transaction */  TCHDB *hdb;                            /* internal database object */  char *opaque;                          /* opaque buffer */  bool open;                             /* whether the internal database is opened */  bool wmode;                            /* whether to be writable */  uint32_t lmemb;                        /* number of members in each leaf */  uint32_t nmemb;                        /* number of members in each node */  uint8_t opts;                          /* options */  uint64_t root;                         /* ID number of the root page */  uint64_t first;                        /* ID number of the first leaf */  uint64_t last;                         /* ID number of the last leaf */  uint64_t lnum;                         /* number of leaves */  uint64_t nnum;                         /* number of nodes */  uint64_t rnum;                         /* number of records */  TCMAP *leafc;                          /* cache for leaves */  TCMAP *nodec;                          /* cache for nodes */  BDBCMP cmp;                            /* pointer to the comparison function */  void *cmpop;                           /* opaque object for the comparison function */  uint32_t lcnum;                        /* max number of cached leaves */  uint32_t ncnum;                        /* max number of cached nodes */  uint32_t lsmax;                        /* max size of each leaf */  uint32_t lschk;                        /* counter for leaf size checking */  uint64_t capnum;                       /* capacity number of records */  uint64_t *hist;                        /* history array of visited nodes */  int hnum;                              /* number of element of the history array */  uint64_t hleaf;                        /* ID number of the leaf referred by the history */  uint64_t lleaf;                        /* ID number of the last visited leaf */  bool tran;                             /* whether in the transaction */  char *rbopaque;                        /* opaque for rollback */  int64_t cnt_saveleaf;                  /* tesing counter for leaf save times */  int64_t cnt_loadleaf;                  /* tesing counter for leaf load times */  int64_t cnt_killleaf;                  /* tesing counter for leaf kill times */  int64_t cnt_adjleafc;                  /* tesing counter for node cache adjust times */  int64_t cnt_savenode;                  /* tesing counter for node save times */  int64_t cnt_loadnode;                  /* tesing counter for node load times */  int64_t cnt_adjnodec;                  /* tesing counter for node cache adjust times */} TCBDB;enum {                                   /* enumeration for additional flags */  BDBFOPEN = HDBFOPEN,                   /* whether opened */  BDBFFATAL = HDBFFATAL                  /* whetehr with fatal error */};enum {                                   /* enumeration for tuning options */  BDBTLARGE = 1 << 0,                    /* use 64-bit bucket array */  BDBTDEFLATE = 1 << 1,                  /* compress each page with Deflate */  BDBTBZIP = 1 << 2,                     /* compress each record with BZIP2 */  BDBTTCBS = 1 << 3,                     /* compress each page with TCBS */  BDBTEXCODEC = 1 << 4                   /* compress each record with outer functions */};enum {                                   /* enumeration for open modes */  BDBOREADER = 1 << 0,                   /* open as a reader */  BDBOWRITER = 1 << 1,                   /* open as a writer */  BDBOCREAT = 1 << 2,                    /* writer creating */  BDBOTRUNC = 1 << 3,                    /* writer truncating */  BDBONOLCK = 1 << 4,                    /* open without locking */  BDBOLCKNB = 1 << 5                     /* lock without blocking */};typedef struct {                         /* type of structure for a B+ tree cursor */  TCBDB *bdb;                            /* database object */  uint64_t id;                           /* ID number of the leaf */  int32_t kidx;                          /* number of the key */  int32_t vidx;                          /* number of the value */} BDBCUR;enum {                                   /* enumeration for cursor put mode */  BDBCPCURRENT,                          /* current */  BDBCPBEFORE,                           /* before */  BDBCPAFTER                             /* after */};/* Get the message string corresponding to an error code.   `ecode' specifies the error code.   The return value is the message string of the error code. */const char *tcbdberrmsg(int ecode);/* Create a B+ tree database object.   The return value is the new B+ tree database object. */TCBDB *tcbdbnew(void);/* Delete a B+ tree database object.   `bdb' specifies the B+ tree database object.   If the database is not closed, it is closed implicitly.  Note that the deleted object and its   derivatives can not be used anymore. */void tcbdbdel(TCBDB *bdb);/* Get the last happened error code of a B+ tree database object.   `bdb' specifies the B+ tree database object.   The return value is the last happened error code.   The following error codes are defined: `TCESUCCESS' for success, `TCETHREAD' for threading   error, `TCEINVALID' for invalid operation, `TCENOFILE' for file not found, `TCENOPERM' for no   permission, `TCEMETA' for invalid meta data, `TCERHEAD' for invalid record header, `TCEOPEN'   for open error, `TCECLOSE' for close error, `TCETRUNC' for trunc error, `TCESYNC' for sync   error, `TCESTAT' for stat error, `TCESEEK' for seek error, `TCEREAD' for read error,   `TCEWRITE' for write error, `TCEMMAP' for mmap error, `TCELOCK' for lock error, `TCEUNLINK'   for unlink error, `TCERENAME' for rename error, `TCEMKDIR' for mkdir error, `TCERMDIR' for   rmdir error, `TCEKEEP' for existing record, `TCENOREC' for no record found, and `TCEMISC' for   miscellaneous error. */int tcbdbecode(TCBDB *bdb);/* Set mutual exclusion control of a B+ tree database object for threading.   `bdb' specifies the B+ tree database object which is not opened.   If successful, the return value is true, else, it is false.   Note that the mutual exclusion control is needed if the object is shared by plural threads and   this function should should be called before the database is opened. */bool tcbdbsetmutex(TCBDB *bdb);/* Set the custom comparison function of a B+ tree database object.   `bdb' specifies the B+ tree database object which is not opened.   `cmp' specifies the pointer to the custom comparison function.   `cmpop' specifies an arbitrary pointer to be given as a parameter of the comparison function.   If it is not needed, `NULL' can be specified.   If successful, the return value is true, else, it is false.   The default comparison function compares keys of two records by lexical order.  The functions   `tcbdbcmplexical' (dafault), `tcbdbcmpdecimal', `tcbdbcmpint32', and `tcbdbcmpint64' are   built-in.  Note that the comparison function should be set before the database is opened.   Moreover, user-defined comparison functions should be set every time the database is being   opened. */bool tcbdbsetcmpfunc(TCBDB *bdb, BDBCMP cmp, void *cmpop);/* Set the tuning parameters of a B+ tree database object.   `bdb' specifies the B+ tree database object which is not opened.   `lmemb' specifies the number of members in each leaf page.  If it is not more than 0, the   default value is specified.  The default value is 128.   `nmemb' specifies the number of members in each non-leaf page.  If it is not more than 0, the   default value is specified.  The default value is 256.   `bnum' specifies the number of elements of the bucket array.  If it is not more than 0, the   default value is specified.  The default value is 32749.  Suggested size of the bucket array   is about from 1 to 4 times of the number of all pages to be stored.   `apow' specifies the size of record alignment by power of 2.  If it is negative, the default   value is specified.  The default value is 8 standing for 2^8=256.   `fpow' specifies the maximum number of elements of the free block pool by power of 2.  If it   is negative, the default value is specified.  The default value is 10 standing for 2^10=1024.   `opts' specifies options by bitwise or: `BDBTLARGE' specifies that the size of the database   can be larger than 2GB by using 64-bit bucket array, `BDBTDEFLATE' specifies that each page   is compressed with Deflate encoding, `BDBTBZIP' specifies that each page is compressed with   BZIP2 encoding, `BDBTTCBS' specifies that each page is compressed with TCBS encoding.   If successful, the return value is true, else, it is false.   Note that the tuning parameters should be set before the database is opened. */bool tcbdbtune(TCBDB *bdb, int32_t lmemb, int32_t nmemb,               int64_t bnum, int8_t apow, int8_t fpow, uint8_t opts);/* Set the caching parameters of a B+ tree database object.   `bdb' specifies the B+ tree database object which is not opened.   `lcnum' specifies the maximum number of leaf nodes to be cached.  If it is not more than 0,   the default value is specified.  The default value is 1024.   `ncnum' specifies the maximum number of non-leaf nodes to be cached.  If it is not more than 0,   the default value is specified.  The default value is 512.   If successful, the return value is true, else, it is false.   Note that the caching parameters should be set before the database is opened. */bool tcbdbsetcache(TCBDB *bdb, int32_t lcnum, int32_t ncnum);/* Set the size of the extra mapped memory of a B+ tree database object.   `bdb' specifies the B+ tree database object which is not opened.   `xmsiz' specifies the size of the extra mapped memory.  If it is not more than 0, the extra   mapped memory is disabled.  It is disabled by default.   If successful, the return value is true, else, it is false.   Note that the mapping parameters should be set before the database is opened. */bool tcbdbsetxmsiz(TCBDB *bdb, int64_t xmsiz);/* Open a database file and connect a B+ tree database object.   `bdb' specifies the B+ tree database object which is not opened.   `path' specifies the path of the database file.   `omode' specifies the connection mode: `BDBOWRITER' as a writer, `BDBOREADER' as a reader.   If the mode is `BDBOWRITER', the following may be added by bitwise or: `BDBOCREAT', which   means it creates a new database if not exist, `BDBOTRUNC', which means it creates a new database   regardless if one exists.  Both of `BDBOREADER' and `BDBOWRITER' can be added to by   bitwise or: `BDBONOLCK', which means it opens the database file without file locking, or   `BDBOLCKNB', which means locking is performed without blocking.   If successful, the return value is true, else, it is false. */bool tcbdbopen(TCBDB *bdb, const char *path, int omode);/* Close a B+ tree database object.   `bdb' specifies the B+ tree database object.   If successful, the return value is true, else, it is false.   Update of a database is assured to be written when the database is closed.  If a writer opens   a database but does not close it appropriately, the database will be broken. */bool tcbdbclose(TCBDB *bdb);/* Store a record into a B+ tree database object.   `bdb' specifies the B+ tree database object connected as a writer.   `kbuf' specifies the pointer to the region of the key.   `ksiz' specifies the size of the region of the key.   `vbuf' specifies the pointer to the region of the value.   `vsiz' specifies the size of the region of the value.   If successful, the return value is true, else, it is false.   If a record with the same key exists in the database, it is overwritten. */bool tcbdbput(TCBDB *bdb, const void *kbuf, int ksiz, const void *vbuf, int vsiz);/* Store a string record into a B+ tree database object.   `bdb' specifies the B+ tree database object connected as a writer.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品亚洲一区二区在线播放| 成人国产精品免费观看视频| 亚洲人精品午夜| 国产精品色噜噜| 国产精品视频一二| 久久久精品tv| 国产欧美一区二区在线观看| 国产女人18水真多18精品一级做| 精品福利一区二区三区| 国产午夜一区二区三区| 国产精品视频一二三| 综合亚洲深深色噜噜狠狠网站| 国产精品系列在线| 国产精品久久久久一区二区三区 | 91精品国产综合久久香蕉的特点| 欧美日韩三级视频| 91精品中文字幕一区二区三区| 欧美日韩不卡一区二区| 91麻豆精品国产自产在线 | 国产美女在线精品| 国产伦精品一区二区三区在线观看| 极品少妇一区二区三区精品视频| 国产呦萝稀缺另类资源| 粉嫩嫩av羞羞动漫久久久| 色婷婷国产精品| 欧美日韩高清一区二区| 久久综合视频网| 日韩理论在线观看| 日本亚洲电影天堂| 不卡的电影网站| 欧美剧在线免费观看网站| 久久免费午夜影院| 一区二区视频在线看| 日韩成人伦理电影在线观看| 国产精品一区二区三区乱码 | 亚洲国产裸拍裸体视频在线观看乱了| 亚洲成国产人片在线观看| 精品一区二区三区在线播放视频| 成人毛片在线观看| 欧美一级欧美三级| 亚洲人成在线观看一区二区| 美国三级日本三级久久99 | 91国偷自产一区二区三区观看| 欧美一级久久久| 亚洲欧美综合网| 久久99国产精品久久99| 欧美怡红院视频| 国产调教视频一区| 天天综合天天综合色| 97国产精品videossex| 精品区一区二区| 午夜久久久久久久久| 成人av片在线观看| 久久无码av三级| 日韩精品高清不卡| 色噜噜偷拍精品综合在线| 精品国产三级电影在线观看| 亚洲国产sm捆绑调教视频| jlzzjlzz亚洲女人18| 久久久午夜精品| 免费看欧美女人艹b| 色又黄又爽网站www久久| 久久久久久久网| 麻豆一区二区三| 在线不卡免费av| 丝袜美腿亚洲一区| 在线免费av一区| 亚洲天堂免费看| 成人av影院在线| 国产精品久久久久久久久久久免费看| 久久福利资源站| 日韩欧美激情一区| 美国三级日本三级久久99| 欧美电影在哪看比较好| 天天综合色天天综合色h| 欧洲激情一区二区| 夜夜爽夜夜爽精品视频| 在线观看一区二区视频| 亚洲综合清纯丝袜自拍| 一本大道久久a久久精二百| 136国产福利精品导航| 成人av午夜影院| 亚洲欧美福利一区二区| 色婷婷精品大在线视频| 亚洲午夜电影在线| 欧美电影一区二区三区| 狠狠色丁香九九婷婷综合五月| 精品久久久久久久久久久久久久久| 麻豆91在线播放免费| 久久综合九色综合欧美就去吻 | 成人综合婷婷国产精品久久| 久久久99精品免费观看不卡| 白白色 亚洲乱淫| 中文字幕在线不卡一区二区三区| av电影天堂一区二区在线 | 欧美高清精品3d| 免费美女久久99| 日本一区二区电影| 色哟哟精品一区| 日本免费新一区视频| 久久婷婷成人综合色| 成人av先锋影音| 天天色 色综合| 26uuu另类欧美| 97精品国产露脸对白| 人人爽香蕉精品| 国产三级一区二区三区| 欧美日韩一二三| 国产成人午夜精品5599| 亚洲尤物在线视频观看| 欧美tickling挠脚心丨vk| 成人中文字幕在线| 五月婷婷欧美视频| 国产亚洲人成网站| 555夜色666亚洲国产免| 国产成人日日夜夜| 亚洲高清久久久| 国产视频一区在线观看 | 欧美日本一区二区| 国产成人自拍在线| 亚洲小说春色综合另类电影| 欧美精品一区男女天堂| 色噜噜狠狠成人中文综合 | 亚洲色欲色欲www在线观看| 日韩欧美一级片| 在线区一区二视频| 成人黄色777网| 国产在线日韩欧美| 午夜私人影院久久久久| 中文字幕一区二区三区av| 欧美videofree性高清杂交| 欧美色倩网站大全免费| zzijzzij亚洲日本少妇熟睡| 久久99精品一区二区三区 | 日韩女同互慰一区二区| 在线视频一区二区免费| 成人精品高清在线| 黄页网站大全一区二区| 日韩精品成人一区二区在线| 亚洲精品成人悠悠色影视| 国产精品国产三级国产aⅴ入口 | 美女视频黄免费的久久 | 成人小视频免费在线观看| 美国三级日本三级久久99| 日韩精品色哟哟| 五月天激情综合| 一个色在线综合| 亚洲狠狠爱一区二区三区| 一区二区三区日韩精品视频| 国产精品的网站| 国产精品久久久久aaaa| 日韩一区欧美一区| 中文字幕一区在线观看| 亚洲欧美怡红院| 亚洲美女区一区| 一区二区三区国产豹纹内裤在线| 亚洲欧美日韩国产成人精品影院| 国产精品视频免费| 国产精品欧美精品| 中文字幕综合网| 一二三四社区欧美黄| 婷婷国产在线综合| 日韩中文欧美在线| 麻豆一区二区三| 国产精品77777| www.综合网.com| 在线观看亚洲一区| 制服丝袜av成人在线看| 91精品国产综合久久久久久漫画 | 91精品国产色综合久久不卡蜜臀 | 国产欧美一区二区精品性| 国产偷国产偷精品高清尤物| 国产精品丝袜一区| 亚洲夂夂婷婷色拍ww47| 美女一区二区视频| 成人免费看黄yyy456| 欧美在线观看18| 欧美一区二区三区四区久久| 精品久久国产字幕高潮| 亚洲国产成人私人影院tom| 亚洲视频资源在线| 视频一区二区不卡| 国产精品538一区二区在线| 99精品视频在线播放观看| 欧美日韩国产成人在线91| 久久亚洲综合色一区二区三区| 中文字幕在线一区免费| 日韩在线一区二区三区| 成人久久视频在线观看| 精品视频资源站| 国产午夜精品一区二区| 一区二区三区精品| 国产曰批免费观看久久久| 91精品福利视频| 精品国产凹凸成av人网站| 亚洲综合视频在线观看| 国产高清视频一区| 91精品国产综合久久国产大片| 国产欧美精品在线观看| 日韩精品亚洲专区|