File: tc_space.h

package info (click to toggle)
tarantool 1.5.2.20.g5f5d924-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 26,568 kB
  • ctags: 18,697
  • sloc: ansic: 109,092; sh: 21,312; cpp: 20,633; xml: 9,666; asm: 2,488; python: 2,195; java: 1,759; perl: 1,002; makefile: 679
file content (40 lines) | stat: -rw-r--r-- 777 bytes parent folder | download | duplicates (2)
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
#ifndef TC_SPACE_H_INCLUDED
#define TC_SPACE_H_INCLUDED

enum tc_space_key_type {
	TC_SPACE_KEY_UNKNOWN = -1,
	TC_SPACE_KEY_NUM = 0,
	TC_SPACE_KEY_NUM64,
	TC_SPACE_KEY_STRING
};

struct tc_space_key_field {
	enum tc_space_key_type type;
	int n;
};

struct tc_space_key {
	struct tc_space_key_field *fields;
	int count;
};

struct tc_space {
	uint32_t id;
	struct mh_pk_t *hash_log;
	struct mh_pk_t *hash_snap;
	struct tc_space_key pk;
};

struct tc_spaces {
	struct mh_u32ptr_t *t;
};

int tc_space_init(struct tc_spaces *s);
void tc_space_free(struct tc_spaces *s);

struct tc_space *tc_space_create(struct tc_spaces *s, uint32_t id);
struct tc_space *tc_space_match(struct tc_spaces *s, uint32_t id);

int tc_space_fill(struct tc_spaces *s, struct tc_options *opts);

#endif