6 #ifndef KNOWROB_TRANSACTION_H
7 #define KNOWROB_TRANSACTION_H
10 #include "knowrob/ThreadPool.h"
11 #include "knowrob/storage/Storage.h"
12 #include "knowrob/semweb/TripleContainer.h"
14 #include "knowrob/storage/ReificationContainer.h"
25 Transaction(
const std::shared_ptr<QueryableStorage> &queryable,
26 const std::shared_ptr<Vocabulary> &vocabulary,
73 std::vector<std::shared_ptr<NamedBackend>>
backends_;
96 Insert(
const std::shared_ptr<QueryableStorage> &queryable,
const std::shared_ptr<Vocabulary> &vocabulary)
112 Remove(
const std::shared_ptr<QueryableStorage> &queryable,
const std::shared_ptr<Vocabulary> &vocabulary)
bool doCommit(const Triple &triple, const StoragePtr &backend) override
bool doCommit(const TripleContainerPtr &triples, const StoragePtr &backend) override
void updateVocabulary(const Triple &triple) override
Insert(const std::shared_ptr< QueryableStorage > &queryable, const std::shared_ptr< Vocabulary > &vocabulary)
bool doCommit(const TripleContainerPtr &triples, const StoragePtr &backend) override
void updateVocabulary(const Triple &triple) override
bool doCommit(const Triple &triple, const StoragePtr &backend) override
Remove(const std::shared_ptr< QueryableStorage > &queryable, const std::shared_ptr< Vocabulary > &vocabulary)
void addBackend(const std::shared_ptr< NamedBackend > &backend)
bool commit(const TripleContainerPtr &triples)
std::shared_ptr< Vocabulary > vocabulary_
bool commitProtected(const TripleContainerPtr &triple, const StoragePtr &backend)
IRIAtomPtr queryReifiedName(const Triple &triple)
virtual ~Transaction()=default
std::shared_ptr< QueryableStorage > queryable_
bool commit(const TripleContainerPtr &triples, const ReifiedNames &reifiedNames)
Transaction(const std::shared_ptr< QueryableStorage > &queryable, const std::shared_ptr< Vocabulary > &vocabulary, bool isRemoval)
static std::shared_ptr< ThreadPool::Runner > createTripleWorker(const TripleContainerPtr &triples, const std::function< void(const TriplePtr &)> &fn)
virtual bool doCommit(const TripleContainerPtr &triples, const StoragePtr &backend)=0
std::vector< std::shared_ptr< NamedBackend > > backends_
virtual void updateVocabulary(const Triple &triple)=0
bool commit(const Triple &triple)
virtual bool doCommit(const Triple &triple, const StoragePtr &backend)=0
bool commit(const Triple &triple, const IRIAtomPtr &reifiedName)
FunctionRule & function()
std::shared_ptr< TripleContainer > TripleContainerPtr
std::shared_ptr< IRIAtom > IRIAtomPtr
std::shared_ptr< std::vector< IRIAtomPtr > > ReifiedNames
std::shared_ptr< Storage > StoragePtr