1 | /* |
2 | * batch.h |
3 | * |
4 | * Copyright (C) 2008-2015 Aerospike, Inc. |
5 | * |
6 | * Portions may be licensed to Aerospike, Inc. under one or more contributor |
7 | * license agreements. |
8 | * |
9 | * This program is free software: you can redistribute it and/or modify it under |
10 | * the terms of the GNU Affero General Public License as published by the Free |
11 | * Software Foundation, either version 3 of the License, or (at your option) any |
12 | * later version. |
13 | * |
14 | * This program is distributed in the hope that it will be useful, but WITHOUT |
15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
16 | * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more |
17 | * details. |
18 | * |
19 | * You should have received a copy of the GNU Affero General Public License |
20 | * along with this program. If not, see http://www.gnu.org/licenses/ |
21 | */ |
22 | |
23 | #pragma once |
24 | |
25 | #include <stddef.h> |
26 | #include <stdint.h> |
27 | |
28 | #include "citrusleaf/cf_digest.h" |
29 | |
30 | #include "dynbuf.h" |
31 | |
32 | struct as_bin_s; |
33 | struct as_file_handle_s; |
34 | struct as_msg_field_s; |
35 | struct as_msg_op_s; |
36 | struct as_transaction_s; |
37 | struct cl_msg_s; |
38 | struct predexp_eval_base_s; |
39 | |
40 | typedef struct as_batch_shared_s as_batch_shared; |
41 | |
42 | int as_batch_init(); |
43 | int as_batch_queue_task(struct as_transaction_s* tr); |
44 | void as_batch_add_result(struct as_transaction_s* tr, uint16_t n_bins, struct as_bin_s** bins, struct as_msg_op_s** ops); |
45 | void as_batch_add_proxy_result(as_batch_shared* shared, uint32_t index, cf_digest* digest, struct cl_msg_s* cmsg, size_t size); |
46 | void as_batch_add_error(as_batch_shared* shared, uint32_t index, int result_code); |
47 | int as_batch_threads_resize(uint32_t threads); |
48 | void as_batch_queues_info(cf_dyn_buf* db); |
49 | int as_batch_unused_buffers(); |
50 | void as_batch_destroy(); |
51 | |
52 | struct as_file_handle_s* as_batch_get_fd_h(as_batch_shared* shared); |
53 | struct as_msg_field_s* as_batch_get_predexp_mf(as_batch_shared* shared); |
54 | struct predexp_eval_base_s* as_batch_get_predexp(as_batch_shared* shared); |
55 | |