forked from bloomberg/comdb2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bdb_queuedb.h
60 lines (44 loc) · 2.21 KB
/
bdb_queuedb.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef INCLUDED_QUEUEDB_H
#define INCLUDED_QUEUEDB_H
#include "trigger_sub_status.h"
int bdb_queuedb_create_cron(void *);
void bdb_queuedb_init_priv(bdb_state_type *bdb_state);
/* don't need, we'll have a single consumer per queue? */
int bdb_queuedb_consumer(bdb_state_type *bdb_state, int consumer, int active,
int *bdberr);
/* need, but different */
int bdb_queuedb_best_pagesize(int avg_item_sz);
/* add to queue */
int bdb_queuedb_add(bdb_state_type *bdb_state, tran_type *tran, const void *dta,
size_t dtalen, int *bdberr, unsigned long long *out_genid);
/* no-op */
int bdb_queuedb_add_goose(bdb_state_type *bdb_state, tran_type *tran,
int *bdberr);
/* no-op */
int bdb_queuedb_check_goose(bdb_state_type *bdb_state, tran_type *tran,
int *bdberr);
/* no-op */
int bdb_queuedb_consume_goose(bdb_state_type *bdb_state, tran_type *tran,
int *bdberr);
int bdb_queuedb_walk(bdb_state_type *bdb_state, int flags, void *lastitem,
bdb_queue_walk_callback_t callback, tran_type *tran,
void *userptr, int *bdberr);
int bdb_queuedb_dump(bdb_state_type *bdb_state, FILE *out, int *bdberr);
int bdb_queuedb_get(bdb_state_type *bdb_state, tran_type *tran, int consumer,
const struct bdb_queue_cursor *prevcursor,
struct bdb_queue_found **fnd, size_t *fnddtalen,
size_t *fnddtaoff, struct bdb_queue_cursor *fndcursor,
long long *seq, int *bdberr);
int bdb_queuedb_consume(bdb_state_type *bdb_state, tran_type *tran,
int consumer, const struct bdb_queue_found *prevfnd,
int *bdberr);
const struct bdb_queue_stats *bdb_queuedb_get_stats(bdb_state_type *bdb_state);
int bdb_trigger_subscribe(bdb_state_type *, pthread_cond_t **,
pthread_mutex_t **, const uint8_t **status);
int bdb_trigger_unsubscribe(bdb_state_type *);
int bdb_trigger_open(bdb_state_type *);
int bdb_trigger_close(bdb_state_type *);
int bdb_trigger_ispaused(bdb_state_type *);
int bdb_trigger_pause(bdb_state_type *);
int bdb_trigger_unpause(bdb_state_type *);
#endif