NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
neograph::program::SyncProgramStore Class Referenceabstract

Base of a ProgramStore whose backend is synchronous: the in-memory store, SQLite and PostgreSQL. More...

#include <store.h>

Inheritance diagram for neograph::program::SyncProgramStore:
[legend]
Collaboration diagram for neograph::program::SyncProgramStore:
[legend]

Public Member Functions

bool completes_at_once () const noexcept
 True when every awaitable operation completes at once on the calling thread, not on a pool thread.
 
asio::awaitable< std::optional< ProgramActivation > > get_activation (std::string_view owner_scope) const final
 Owner-scoped activation lifecycle.
 
asio::awaitable< std::optional< ProgramActivationBinding > > get_active_binding (std::string_view owner_scope) const final
 Return one coherent activation/version tuple.
 
asio::awaitable< std::optional< ProgramBundle > > get_bundle (std::string_view owner_scope, std::string_view id) const final
 Owner-qualified lookups.
 
asio::awaitable< void > publish_admitted (const ProgramBundle &bundle, const ProgramVersion &version) final
 Atomically publish one admitted bundle/version tuple.
 

Protected Member Functions

virtual bool offloads () const noexcept
 True for a backend that blocks for long: each operation then runs on a pool thread.
 

Detailed Description

Base of a ProgramStore whose backend is synchronous: the in-memory store, SQLite and PostgreSQL.

A derived class implements the ..._sync operations and gets the awaitable interface from them, as SyncProgramTransitionStore does.

Definition at line 123 of file store.h.

Member Function Documentation

◆ get_activation()

asio::awaitable< std::optional< ProgramActivation > > neograph::program::SyncProgramStore::get_activation ( std::string_view  ) const
finalvirtual

Owner-scoped activation lifecycle.

The default keeps the bounded P2 adapter intentionally administration-inaccessible. Implementations must verify that the target version and policy hash belong to owner_scope and must return Conflict without publishing when the generation is stale.

Reimplemented from neograph::program::ProgramStore.

◆ get_active_binding()

asio::awaitable< std::optional< ProgramActivationBinding > > neograph::program::SyncProgramStore::get_active_binding ( std::string_view  owner_scope) const
finalvirtual

Return one coherent activation/version tuple.

Implementations must read both records under their backend lock or transaction; a missing or corrupt target fails closed rather than returning a partial tuple.

Reimplemented from neograph::program::ProgramStore.

◆ get_bundle()

asio::awaitable< std::optional< ProgramBundle > > neograph::program::SyncProgramStore::get_bundle ( std::string_view  ,
std::string_view   
) const
finalvirtual

Owner-qualified lookups.

A wrong owner is indistinguishable from an absent object. The legacy unqualified overloads remain available for local migration/introspection callers, but Catalog and Runtime must use these overloads for authority-bearing resolution.

Reimplemented from neograph::program::ProgramStore.

◆ publish_admitted()

asio::awaitable< void > neograph::program::SyncProgramStore::publish_admitted ( const ProgramBundle &  bundle,
const ProgramVersion &  version 
)
finalvirtual

Atomically publish one admitted bundle/version tuple.

Implementations must provide the strong exception guarantee: if this call throws, neither object may become observable through get_bundle() or get_version().

Implements neograph::program::ProgramStore.


The documentation for this class was generated from the following file: