knowrob
2.1.0
A Knowledge Base System for Cognition-enabled Robots
|
#include <Transaction.h>
Public Member Functions | |
Transaction (const std::shared_ptr< QueryableStorage > &queryable, const std::shared_ptr< Vocabulary > &vocabulary, bool isRemoval) | |
virtual | ~Transaction ()=default |
void | addBackend (const std::shared_ptr< NamedBackend > &backend) |
bool | commit (const Triple &triple) |
bool | commit (const Triple &triple, const IRIAtomPtr &reifiedName) |
bool | commit (const TripleContainerPtr &triples) |
bool | commit (const TripleContainerPtr &triples, const ReifiedNames &reifiedNames) |
Transaction (const std::shared_ptr< QueryableStorage > &queryable, const std::shared_ptr< Vocabulary > &vocabulary, bool isRemoval) | |
virtual | ~Transaction ()=default |
void | addBackend (const std::shared_ptr< NamedBackend > &backend) |
bool | commit (const Triple &triple) |
bool | commit (const Triple &triple, const IRIAtomPtr &reifiedName) |
bool | commit (const TripleContainerPtr &triples) |
bool | commit (const TripleContainerPtr &triples, const ReifiedNames &reifiedNames) |
Protected Member Functions | |
bool | commitProtected (const TripleContainerPtr &triple, const StoragePtr &backend) |
virtual bool | doCommit (const Triple &triple, const StoragePtr &backend)=0 |
virtual bool | doCommit (const TripleContainerPtr &triples, const StoragePtr &backend)=0 |
virtual void | updateVocabulary (const Triple &triple)=0 |
IRIAtomPtr | queryReifiedName (const Triple &triple) |
bool | commitProtected (const TripleContainerPtr &triple, const StoragePtr &backend) |
virtual bool | doCommit (const Triple &triple, const StoragePtr &backend)=0 |
virtual bool | doCommit (const TripleContainerPtr &triples, const StoragePtr &backend)=0 |
virtual void | updateVocabulary (const Triple &triple)=0 |
IRIAtomPtr | queryReifiedName (const Triple &triple) |
Static Protected Member Functions | |
static std::shared_ptr< ThreadPool::Runner > | createTripleWorker (const TripleContainerPtr &triples, const std::function< void(const TriplePtr &)> &fn) |
static std::shared_ptr< ThreadPool::Runner > | createTripleWorker (const TripleContainerPtr &triples, const std::function< void(const TriplePtr &)> &fn) |
Protected Attributes | |
std::shared_ptr< Vocabulary > | vocabulary_ |
std::shared_ptr< QueryableStorage > | queryable_ |
std::vector< std::shared_ptr< NamedBackend > > | backends_ |
bool | isRemoval_ |
Baseclass for transactions. A set of backends can be added to a transaction. When a transaction is committed, the triple is committed to all backends. If a backend does not support the context of the triple, the triple is reified and the reified triples are committed to the backend.
Definition at line 23 of file Transaction.h.
|
inline |
Definition at line 25 of file Transaction.h.
|
virtualdefault |
|
inline |
Definition at line 25 of file Transaction.h.
|
virtualdefault |
|
inline |
Adds a backend to the transaction.
backend | the backend to add. |
Definition at line 38 of file Transaction.h.
|
inline |
Adds a backend to the transaction.
backend | the backend to add. |
Definition at line 38 of file Transaction.h.
bool Transaction::commit | ( | const Triple & | triple | ) |
Commits a triple to all backends.
triple | the triple to commit. |
Definition at line 58 of file Transaction.cpp.
bool knowrob::transaction::Transaction::commit | ( | const Triple & | triple | ) |
Commits a triple to all backends.
triple | the triple to commit. |
bool Transaction::commit | ( | const Triple & | triple, |
const IRIAtomPtr & | reifiedName | ||
) |
Commits a triple to all backends.
triple | the triple to commit. |
reifiedName | the reified name of the triple. |
Definition at line 67 of file Transaction.cpp.
bool knowrob::transaction::Transaction::commit | ( | const Triple & | triple, |
const IRIAtomPtr & | reifiedName | ||
) |
Commits a triple to all backends.
triple | the triple to commit. |
reifiedName | the reified name of the triple. |
bool Transaction::commit | ( | const TripleContainerPtr & | triples | ) |
Commits a set of triples to all backends.
triples | the triples to commit. |
Definition at line 90 of file Transaction.cpp.
bool knowrob::transaction::Transaction::commit | ( | const TripleContainerPtr & | triples | ) |
Commits a set of triples to all backends.
triples | the triples to commit. |
bool Transaction::commit | ( | const TripleContainerPtr & | triples, |
const ReifiedNames & | reifiedNames | ||
) |
Commits a set of triples to all backends.
triples | the triples to commit. |
reifiedNames | the reified names of the triples. |
Definition at line 126 of file Transaction.cpp.
bool knowrob::transaction::Transaction::commit | ( | const TripleContainerPtr & | triples, |
const ReifiedNames & | reifiedNames | ||
) |
Commits a set of triples to all backends.
triples | the triples to commit. |
reifiedNames | the reified names of the triples. |
|
protected |
Definition at line 162 of file Transaction.cpp.
|
protected |
|
staticprotected |
Definition at line 171 of file Transaction.cpp.
|
staticprotected |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protected |
Definition at line 41 of file Transaction.cpp.
|
protected |
|
protectedpure virtual |
|
protectedpure virtual |
|
protected |
Definition at line 73 of file Transaction.h.
|
protected |
Definition at line 74 of file Transaction.h.
|
protected |
Definition at line 72 of file Transaction.h.
|
protected |
Definition at line 71 of file Transaction.h.