]> git.saurik.com Git - redis.git/blob - src/rdb.h
Abstract file/buffer I/O to support in-memory serialization
[redis.git] / src / rdb.h
1 #ifndef __REDIS_RDB_H
2 #define __REDIS_RDB_H
3
4 #include <stdio.h>
5 #include "rio.h"
6
7 /* TBD: include only necessary headers. */
8 #include "redis.h"
9
10 int rdbLoad(char *filename);
11 int rdbSaveBackground(char *filename);
12 void rdbRemoveTempFile(pid_t childpid);
13 int rdbSave(char *filename);
14 int rdbSaveObject(rio *rdb, robj *o);
15 off_t rdbSavedObjectLen(robj *o);
16 off_t rdbSavedObjectPages(robj *o);
17 robj *rdbLoadObject(int type, rio *rdb);
18 void backgroundSaveDoneHandler(int exitcode, int bysignal);
19 int rdbSaveKeyValuePair(rio *rdb, robj *key, robj *val, time_t expireitme, time_t now);
20 int rdbLoadType(rio *rdb);
21 time_t rdbLoadTime(rio *rdb);
22 robj *rdbLoadStringObject(rio *rdb);
23 int rdbSaveType(rio *rdb, unsigned char type);
24 int rdbSaveLen(rio *rdb, uint32_t len);
25
26 #endif