|
A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
|
Creates SQLiteChunkStores rooted at one directory. More...
#include <cpp/a11/stores/sqlite_chunk_store.h>
Public Member Functions | |
| absl::StatusOr< std::shared_ptr< SQLiteChunkStore > > | Open (std::string node_id) |
Open a store for node_id under this factory's root. | |
| std::string | root () const |
| The root this factory creates stores under. | |
| const SQLiteChunkStoreOptions & | options () const |
| The validated storage policy applied to every store created here. | |
| a11::Future< size_t > | SweepOrphanBlobs () |
| Delete unreferenced blob files older than the configured grace period. | |
| SQLiteChunkStoreFactory (ConstructorToken, std::shared_ptr< internal::SqliteDatabase > database, SQLiteChunkStoreOptions options) | |
Static Public Member Functions | |
| static absl::StatusOr< std::shared_ptr< SQLiteChunkStoreFactory > > | Create (const std::string &root, SQLiteChunkStoreOptions options) |
Create a factory rooted at root with an explicit policy. | |
| static absl::StatusOr< std::shared_ptr< SQLiteChunkStoreFactory > > | Create (const std::string &root) |
Create a factory rooted at root with the environment/default policy. | |
| static absl::StatusOr< std::shared_ptr< SQLiteChunkStoreFactory > > | Create () |
| Create a factory at the default root with the environment/default policy. | |
| static std::string | DefaultRoot () |
| The process-wide default storage root. | |
Creates SQLiteChunkStores rooted at one directory.
Stores are cheap; the database behind them is not. The factory holds the shared per-root database so that every store it creates reuses one set of connections, worker threads and change hooks. Pass AsChunkStoreFactory() to a NodeMap or AsyncNode to make SQLite the default backing store.
|
inline |
|
static |
Create a factory at the default root with the environment/default policy.
|
static |
Create a factory rooted at root with the environment/default policy.
|
static |
Create a factory rooted at root with an explicit policy.
| root | Directory holding store.sqlite and blobs/; created when absent. |
| options | Storage policy; per-root settings apply only on first open of that root. |
|
static |
The process-wide default storage root.
$A11_SQLITE_CHUNK_STORE_ROOT when set, otherwise $XDG_CACHE_HOME/a11/chunks, otherwise ~/.cache/a11/chunks.
| absl::StatusOr< std::shared_ptr< SQLiteChunkStore > > a11::stores::SQLiteChunkStoreFactory::Open | ( | std::string | node_id | ) |
Open a store for node_id under this factory's root.
| node_id | The node whose fragment log the store backs. |
|
inline |
The validated storage policy applied to every store created here.
| std::string a11::stores::SQLiteChunkStoreFactory::root | ( | ) | const |
The root this factory creates stores under.
| a11::Future< size_t > a11::stores::SQLiteChunkStoreFactory::SweepOrphanBlobs | ( | ) |
Delete unreferenced blob files older than the configured grace period.