OXY-SYNC-CONTAINER 1.0
OXY-SYNC-CONTAINER Library Documentation
Loading...
Searching...
No Matches
oxy::sync::service::syncIf Struct Referenceabstract

Interface for synchronization operations of container. More...

#include <services.hpp>

Public Member Functions

virtual void clone (context_t const &ctx, std::string const &packName) const =0
 Clone the specified pack.
virtual void fetch (context_t const &ctx, std::string const &packName, std::vector< std::string > const &items) const =0
 Fetch the specified items from the pack.
virtual std::vector< std::string > get_oids (context_t const &ctx) const =0
 Get the object IDs associated with the specified context.
virtual std::map< std::string, std::string > get_references (context_t const &ctx) const =0
 Get the references associated with the specified context.
virtual void open (const IConnectionPtr &conn)=0
 Open a connection using the specified IConnection pointer.
virtual void post (context_t const &ctx, std::string const &packName) const =0
 Post the specified pack.
virtual maybe< std::string > set_reference (context_t const &ctx, std::string const &refName, std::string const &latest, std::string const &earlier) const =0
 Set a reference with the specified name and values.

Detailed Description

Interface for synchronization operations of container.

This abstract struct defines the interface for synchronization operations in the library. Implementations of this interface must provide methods to open connections, retrieve object IDs, manage references, and perform clone, fetch, and post operations.

Member Function Documentation

◆ clone()

virtual void oxy::sync::service::syncIf::clone ( context_t const & ctx,
std::string const & packName ) const
pure virtual

Clone the specified pack.

Parameters
ctxThe context for which to clone the pack.
packNameThe name of the pack to clone.

◆ fetch()

virtual void oxy::sync::service::syncIf::fetch ( context_t const & ctx,
std::string const & packName,
std::vector< std::string > const & items ) const
pure virtual

Fetch the specified items from the pack.

Parameters
ctxThe context for which to fetch the items.
packNameThe name of the pack from which to fetch items.
itemsA vector of item names to fetch.

◆ get_oids()

virtual std::vector< std::string > oxy::sync::service::syncIf::get_oids ( context_t const & ctx) const
pure virtual

Get the object IDs associated with the specified context.

Parameters
ctxThe context for which to retrieve object IDs.
Returns
A vector of object IDs.

◆ get_references()

virtual std::map< std::string, std::string > oxy::sync::service::syncIf::get_references ( context_t const & ctx) const
pure virtual

Get the references associated with the specified context.

Parameters
ctxThe context for which to retrieve references.
Returns
A map of reference names to their corresponding values.

◆ open()

virtual void oxy::sync::service::syncIf::open ( const IConnectionPtr & conn)
pure virtual

Open a connection using the specified IConnection pointer.

Parameters
connThe IConnection pointer to use for the connection.

◆ post()

virtual void oxy::sync::service::syncIf::post ( context_t const & ctx,
std::string const & packName ) const
pure virtual

Post the specified pack.

Parameters
ctxThe context for which to post the pack.
packNameThe name of the pack to post.

◆ set_reference()

virtual maybe< std::string > oxy::sync::service::syncIf::set_reference ( context_t const & ctx,
std::string const & refName,
std::string const & latest,
std::string const & earlier ) const
pure virtual

Set a reference with the specified name and values.

Parameters
ctxThe context for which to set the reference.
refNameThe name of the reference to set.
latestThe latest value of the reference.
earlierThe earlier value of the reference.
Returns
A maybe containing the previous value of the reference, if any.