summaryrefslogtreecommitdiffstats
path: root/include/dbcache.h
diff options
context:
space:
mode:
authoralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-07-22 19:49:37 +0000
committeralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-07-22 19:49:37 +0000
commit6c17fbc184e98be0a8c46c1ed383f838de57f80c (patch)
treeba5a657540603e3d25deeba135b5864f4f65efe8 /include/dbcache.h
parenta9bb4776d6000ced0fdbcbee731a13d5ebf1922c (diff)
downloadzabbix-6c17fbc184e98be0a8c46c1ed383f838de57f80c.tar.gz
zabbix-6c17fbc184e98be0a8c46c1ed383f838de57f80c.tar.xz
zabbix-6c17fbc184e98be0a8c46c1ed383f838de57f80c.zip
- support of database cache for history and trends (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@4462 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'include/dbcache.h')
-rw-r--r--include/dbcache.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/dbcache.h b/include/dbcache.h
index 0650d45f..dfbc6f26 100644
--- a/include/dbcache.h
+++ b/include/dbcache.h
@@ -31,6 +31,9 @@
#define ZBX_TREND_SIZE 100000
#define ZBX_ITEMS_SIZE 10000
+#define ZBX_TREND_OP_UPDATE 0
+#define ZBX_TREND_OP_INSERT 1
+
extern char *CONFIG_FILE;
ZBX_DC_HISTORY
@@ -48,6 +51,7 @@ ZBX_DC_HISTORY
ZBX_DC_TREND
{
+ int operation;
zbx_uint64_t itemid;
int clock;
int num;
@@ -82,6 +86,8 @@ int DCadd_history(zbx_uint64_t itemid, double value, int clock);
int DCadd_history_uint(zbx_uint64_t itemid, zbx_uint64_t value, int clock);
int DCadd_history_str(zbx_uint64_t itemid, char *value, int clock);
void DCshow(void);
+void DCsync(void);
+void DCsync_all(void);
void init_database_cache(void);
void free_database_cache(void);