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
11
namespace
dcn::feed
12
{
13
class
IFeedStore
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;
25
virtual
storage::sqlite::WalCheckpointStats
checkpointWal
(
storage::sqlite::WalCheckpointMode
mode) = 0;
26
};
27
}
dcn::feed::IFeedStore
Definition
feed_store.hpp:14
dcn::feed::IFeedStore::applyChange
virtual void applyChange(const events::ChangeRecord &row, std::int64_t now_ms)=0
dcn::feed::IFeedStore::getStreamPage
virtual StreamPage getStreamPage(const StreamQuery &query) const =0
dcn::feed::IFeedStore::setFeedCursor
virtual void setFeedCursor(std::int64_t last_change_seq)=0
dcn::feed::IFeedStore::minAvailableStreamSeq
virtual std::int64_t minAvailableStreamSeq() const =0
dcn::feed::IFeedStore::checkpointWal
virtual storage::sqlite::WalCheckpointStats checkpointWal(storage::sqlite::WalCheckpointMode mode)=0
dcn::feed::IFeedStore::maintainOutbox
virtual void maintainOutbox(std::int64_t now_ms)=0
dcn::feed::IFeedStore::~IFeedStore
virtual ~IFeedStore()=default
dcn::feed::IFeedStore::runArchiveCycle
virtual bool runArchiveCycle(int chain_id, std::size_t hot_window_days, std::int64_t now_ms)=0
dcn::feed::IFeedStore::getFeedCursor
virtual std::int64_t getFeedCursor() const =0
dcn::feed::IFeedStore::getFeedPage
virtual FeedPage getFeedPage(const FeedQuery &query) const =0
event_projector.hpp
feed_types.hpp
dcn::feed
Definition
feed.hpp:17
dcn::storage::sqlite::WalCheckpointMode
WalCheckpointMode
Definition
wal.hpp:9
dcn::events::ChangeRecord
Definition
event_projector.hpp:38
dcn::feed::FeedPage
Definition
feed_types.hpp:57
dcn::feed::FeedQuery
Definition
feed_types.hpp:49
dcn::feed::StreamPage
Definition
feed_types.hpp:81
dcn::feed::StreamQuery
Definition
feed_types.hpp:64
dcn::storage::sqlite::WalCheckpointStats
Definition
wal.hpp:16
wal.hpp
src
feed
include
feed_store.hpp
Generated by
1.14.0