1
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
8
COPYING CONDITIONS NOTICE:
10
This program is free software; you can redistribute it and/or modify
11
it under the terms of version 2 of the GNU General Public License as
12
published by the Free Software Foundation, and provided that the
13
following conditions are met:
15
* Redistributions of source code must retain this COPYING
16
CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the
17
DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the
18
PATENT MARKING NOTICE (below), and the PATENT RIGHTS
21
* Redistributions in binary form must reproduce this COPYING
22
CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the
23
DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the
24
PATENT MARKING NOTICE (below), and the PATENT RIGHTS
25
GRANT (below) in the documentation and/or other materials
26
provided with the distribution.
28
You should have received a copy of the GNU General Public License
29
along with this program; if not, write to the Free Software
30
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
35
TokuDB, Tokutek Fractal Tree Indexing Library.
36
Copyright (C) 2007-2013 Tokutek, Inc.
40
This program is distributed in the hope that it will be useful, but
41
WITHOUT ANY WARRANTY; without even the implied warranty of
42
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
43
General Public License for more details.
45
UNIVERSITY PATENT NOTICE:
47
The technology is licensed by the Massachusetts Institute of
48
Technology, Rutgers State University of New Jersey, and the Research
49
Foundation of State University of New York at Stony Brook under
50
United States of America Serial No. 11/760379 and to the patents
51
and/or patent applications resulting from it.
53
PATENT MARKING NOTICE:
55
This software is covered by US Patent No. 8,185,551.
56
This software is covered by US Patent No. 8,489,638.
60
"THIS IMPLEMENTATION" means the copyrightable works distributed by
61
Tokutek as part of the Fractal Tree project.
63
"PATENT CLAIMS" means the claims of patents that are owned or
64
licensable by Tokutek, both currently or in the future; and that in
65
the absence of this license would be infringed by THIS
66
IMPLEMENTATION or by using or running THIS IMPLEMENTATION.
68
"PATENT CHALLENGE" shall mean a challenge to the validity,
69
patentability, enforceability and/or non-infringement of any of the
70
PATENT CLAIMS or otherwise opposing any of the PATENT CLAIMS.
72
Tokutek hereby grants to you, for the term and geographical scope of
73
the PATENT CLAIMS, a non-exclusive, no-charge, royalty-free,
74
irrevocable (except as stated in this section) patent license to
75
make, have made, use, offer to sell, sell, import, transfer, and
76
otherwise run, modify, and propagate the contents of THIS
77
IMPLEMENTATION, where such license applies only to the PATENT
78
CLAIMS. This grant does not include claims that would be infringed
79
only as a consequence of further modifications of THIS
80
IMPLEMENTATION. If you or your agent or licensee institute or order
81
or agree to the institution of patent litigation against any entity
82
(including a cross-claim or counterclaim in a lawsuit) alleging that
83
THIS IMPLEMENTATION constitutes direct or contributory patent
84
infringement, or inducement of patent infringement, then any rights
85
granted to you under this License shall terminate as of the date
86
such litigation is filed. If you or your agent or exclusive
87
licensee institute or order or agree to the institution of a PATENT
88
CHALLENGE, then Tokutek may terminate any rights granted to you
92
#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
93
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
95
// The loader callbacks are C functions and need to be defined as such
97
typedef void (*ft_loader_error_func)(DB *, int which_db, int err, DBT *key, DBT *val, void *extra);
99
typedef int (*ft_loader_poll_func)(void *extra, float progress);
101
typedef struct ft_loader_s *FTLOADER;
103
int toku_ft_loader_open (FTLOADER *bl,
104
CACHETABLE cachetable,
105
generate_row_for_put_func g,
108
FT_HANDLE brts[/*N*/], DB* dbs[/*N*/],
109
const char * new_fnames_in_env[/*N*/],
110
ft_compare_func bt_compare_functions[/*N*/],
111
const char *temp_file_template,
115
uint64_t reserve_memory_size,
116
bool compress_intermediates);
118
int toku_ft_loader_put (FTLOADER bl, DBT *key, DBT *val);
120
int toku_ft_loader_close (FTLOADER bl,
121
ft_loader_error_func error_callback, void *error_callback_extra,
122
ft_loader_poll_func poll_callback, void *poll_callback_extra);
124
int toku_ft_loader_abort(FTLOADER bl,
127
// For test purposes only
128
void toku_ft_loader_set_size_factor (uint32_t factor);
130
void ft_loader_set_os_fwrite (size_t (*fwrite_fun)(const void*,size_t,size_t,FILE*));
132
size_t ft_loader_leafentry_size(size_t key_size, size_t val_size, TXNID xid);