#ifndef ZABBIX_CACHEHISTORY_H
#define ZABBIX_CACHEHISTORY_H
#include "zbxtrends.h"
#include "zbxhistory.h"
#include "zbxcacheconfig.h"
#include "zbxshmem.h"
#include "zbxipcservice.h"
#define ZBX_HC_PROXYQUEUE_STATE_NORMAL 0
#define ZBX_HC_PROXYQUEUE_STATE_WAIT 1
#define ZBX_HC_SYNC_TIME_MAX 10
#define ZBX_HC_SYNC_MAX 1000
#define ZBX_HC_TIMER_MAX (ZBX_HC_SYNC_MAX / 2)
#define ZBX_HC_TIMER_SOFT_MAX (ZBX_HC_TIMER_MAX - 10)
#define ZBX_SYNC_DONE 0
#define ZBX_SYNC_MORE 1
typedef struct
{
zbx_uint64_t history_counter;
zbx_uint64_t history_float_counter;
zbx_uint64_t history_uint_counter;
zbx_uint64_t history_str_counter;
zbx_uint64_t history_log_counter;
zbx_uint64_t history_text_counter;
zbx_uint64_t history_bin_counter;
zbx_uint64_t notsupported_counter;
}
zbx_dc_stats_t;
typedef struct
{
zbx_dc_stats_t stats;
zbx_uint64_t history_free;
zbx_uint64_t history_total;
zbx_uint64_t index_free;
zbx_uint64_t index_total;
zbx_uint64_t trend_free;
zbx_uint64_t trend_total;
}
zbx_wcache_info_t;
#define ZBX_SYNC_NONE 0
#define ZBX_SYNC_ALL 1
#define ZBX_STATS_HISTORY_COUNTER 0
#define ZBX_STATS_HISTORY_FLOAT_COUNTER 1
#define ZBX_STATS_HISTORY_UINT_COUNTER 2
#define ZBX_STATS_HISTORY_STR_COUNTER 3
#define ZBX_STATS_HISTORY_LOG_COUNTER 4
#define ZBX_STATS_HISTORY_TEXT_COUNTER 5
#define ZBX_STATS_NOTSUPPORTED_COUNTER 6
#define ZBX_STATS_HISTORY_TOTAL 7
#define ZBX_STATS_HISTORY_USED 8
#define ZBX_STATS_HISTORY_FREE 9
#define ZBX_STATS_HISTORY_PUSED 10
#define ZBX_STATS_HISTORY_PFREE 11
#define ZBX_STATS_TREND_TOTAL 12
#define ZBX_STATS_TREND_USED 13
#define ZBX_STATS_TREND_FREE 14
#define ZBX_STATS_TREND_PUSED 15
#define ZBX_STATS_TREND_PFREE 16
#define ZBX_STATS_HISTORY_INDEX_TOTAL 17
#define ZBX_STATS_HISTORY_INDEX_USED 18
#define ZBX_STATS_HISTORY_INDEX_FREE 19
#define ZBX_STATS_HISTORY_INDEX_PUSED 20
#define ZBX_STATS_HISTORY_INDEX_PFREE 21
#define ZBX_STATS_HISTORY_BIN_COUNTER 22