diff options
Diffstat (limited to '')
-rw-r--r-- | src/database/engine/cache.h (renamed from database/engine/cache.h) | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/database/engine/cache.h b/src/database/engine/cache.h index 7cd7c0636..b6f81bcc2 100644 --- a/database/engine/cache.h +++ b/src/database/engine/cache.h @@ -2,6 +2,7 @@ #ifndef DBENGINE_CACHE_H #define DBENGINE_CACHE_H +#include "datafile.h" #include "../rrd.h" // CACHE COMPILE TIME CONFIGURATION @@ -27,7 +28,7 @@ typedef struct pgc_entry { time_t end_time_s; // the end time of the page size_t size; // the size in bytes of the allocation, outside the cache void *data; // a pointer to data outside the cache - uint32_t update_every_s; // the update every of the page + uint32_t update_every_s; // the update every of the page bool hot; // true if this entry is currently being collected uint8_t *custom_data; } PGC_ENTRY; @@ -191,7 +192,7 @@ PGC_PAGE *pgc_page_dup(PGC *cache, PGC_PAGE *page); void pgc_page_release(PGC *cache, PGC_PAGE *page); // mark a hot page dirty, and release it -void pgc_page_hot_to_dirty_and_release(PGC *cache, PGC_PAGE *page); +void pgc_page_hot_to_dirty_and_release(PGC *cache, PGC_PAGE *page, bool never_flush); // find a page from the cache typedef enum { @@ -210,8 +211,8 @@ Word_t pgc_page_section(PGC_PAGE *page); Word_t pgc_page_metric(PGC_PAGE *page); time_t pgc_page_start_time_s(PGC_PAGE *page); time_t pgc_page_end_time_s(PGC_PAGE *page); -time_t pgc_page_update_every_s(PGC_PAGE *page); -time_t pgc_page_fix_update_every(PGC_PAGE *page, time_t update_every_s); +uint32_t pgc_page_update_every_s(PGC_PAGE *page); +uint32_t pgc_page_fix_update_every(PGC_PAGE *page, uint32_t update_every_s); time_t pgc_page_fix_end_time_s(PGC_PAGE *page, time_t end_time_s); void *pgc_page_data(PGC_PAGE *page); void *pgc_page_custom_data(PGC *cache, PGC_PAGE *page); |