Decentralised Art Server
High-performance C++ backend that exposes HTML interface and a secure REST API for managing Performative Transactions entities
Loading...
Searching...
No Matches
feed_store.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <cstdint>
5#include <filesystem>
6
7#include "feed_types.hpp"
8#include "event_projector.hpp"
9#include "sqlite/wal.hpp"
10
11namespace dcn::feed
12{
14 {
15 public:
16 virtual ~IFeedStore() = default;
17 virtual void applyChange(const events::ChangeRecord & row, std::int64_t now_ms) = 0;
18 virtual void maintainOutbox(std::int64_t now_ms) = 0;
19 virtual FeedPage getFeedPage(const FeedQuery & query) const = 0;
20 virtual StreamPage getStreamPage(const StreamQuery & query) const = 0;
21 virtual std::int64_t minAvailableStreamSeq() const = 0;
22 virtual std::int64_t getFeedCursor() const = 0;
23 virtual void setFeedCursor(std::int64_t last_change_seq) = 0;
24 virtual bool runArchiveCycle(int chain_id, std::size_t hot_window_days, std::int64_t now_ms) = 0;
26 };
27}
Definition feed_store.hpp:14
virtual void applyChange(const events::ChangeRecord &row, std::int64_t now_ms)=0
virtual StreamPage getStreamPage(const StreamQuery &query) const =0
virtual void setFeedCursor(std::int64_t last_change_seq)=0
virtual std::int64_t minAvailableStreamSeq() const =0
virtual storage::sqlite::WalCheckpointStats checkpointWal(storage::sqlite::WalCheckpointMode mode)=0
virtual void maintainOutbox(std::int64_t now_ms)=0
virtual ~IFeedStore()=default
virtual bool runArchiveCycle(int chain_id, std::size_t hot_window_days, std::int64_t now_ms)=0
virtual std::int64_t getFeedCursor() const =0
virtual FeedPage getFeedPage(const FeedQuery &query) const =0
Definition feed.hpp:17
WalCheckpointMode
Definition wal.hpp:9
Definition event_projector.hpp:38
Definition feed_types.hpp:57
Definition feed_types.hpp:49
Definition feed_types.hpp:81
Definition feed_types.hpp:64