Go to the source code of this file.
Functions | |
static int | bts_open (struct ccn_btree_io *, struct ccn_btree_node *) |
File-based btree index storage. | |
static int | bts_read (struct ccn_btree_io *, struct ccn_btree_node *, unsigned) |
static int | bts_write (struct ccn_btree_io *, struct ccn_btree_node *) |
static int | bts_close (struct ccn_btree_io *, struct ccn_btree_node *) |
static int | bts_destroy (struct ccn_btree_io **pio) |
Remove the lock file and free up resources. | |
struct ccn_btree_io * | ccn_btree_io_from_directory (const char *path, struct ccn_charbuf *msgs) |
Create a btree storage layer from a directory. | |
static int | bts_remove_lockfile (struct ccn_btree_io *io) |
Remove the lock file, trusting that it is ours. |
static int bts_close | ( | struct ccn_btree_io * | io, | |
struct ccn_btree_node * | node | |||
) | [static] |
static int bts_destroy | ( | struct ccn_btree_io ** | pio | ) | [static] |
Remove the lock file and free up resources.
Definition at line 357 of file ccn_btree_store.c.
Referenced by ccn_btree_io_from_directory().
static int bts_open | ( | struct ccn_btree_io * | io, | |
struct ccn_btree_node * | node | |||
) | [static] |
File-based btree index storage.
Definition at line 198 of file ccn_btree_store.c.
Referenced by ccn_btree_io_from_directory().
static int bts_read | ( | struct ccn_btree_io * | io, | |
struct ccn_btree_node * | node, | |||
unsigned | limit | |||
) | [static] |
static int bts_remove_lockfile | ( | struct ccn_btree_io * | io | ) | [static] |
Remove the lock file, trusting that it is ours.
Definition at line 331 of file ccn_btree_store.c.
Referenced by bts_destroy().
static int bts_write | ( | struct ccn_btree_io * | io, | |
struct ccn_btree_node * | node | |||
) | [static] |
struct ccn_btree_io* ccn_btree_io_from_directory | ( | const char * | path, | |
struct ccn_charbuf * | msgs | |||
) | [read] |
Create a btree storage layer from a directory.
In this implementation of the storage layer, each btree block is stored as a separate file. The files are named using the decimal representation of the nodeid.
If msgs is not NULL, diagnostics may be recorded there.
path | is the name of the directory, which must exist. |
Definition at line 57 of file ccn_btree_store.c.
Referenced by r_store_init(), test_btree_io(), and test_btree_lockfile().