OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
#include <BackingStore.h>
Public Member Functions | |
virtual | ~BackingStore () |
virtual LinkPtr | getLink (Type, const HandleSeq &) const =0 |
virtual NodePtr | getNode (Type, const char *) const =0 |
virtual AtomPtr | getAtom (Handle) const =0 |
virtual HandleSeq | getIncomingSet (Handle) const =0 |
virtual void | storeAtom (Handle)=0 |
virtual void | loadType (AtomTable &, Type)=0 |
virtual void | barrier ()=0 |
virtual bool | ignoreType (Type t) const |
virtual bool | ignoreAtom (Handle) const |
Public Attributes | |
std::set< Type > | _ignored_types |
This class provides a simple, generic interface for dynamically storing/retreiving atoms from disk or other remote location or process. This class focuses on "on-demand" atom retreival, rather than on bulk-save/restore (although perhaps that should be provided as well.)
Definition at line 46 of file BackingStore.h.
|
inlinevirtual |
Definition at line 49 of file BackingStore.h.
|
pure virtual |
Read-write synchronization barrier. All writes will be completed before this routine returns. This allows the backend to implement asynchronous writes, while still providing some control to those who need it. (Mostly the unit tests, at this time.)
Implemented in opencog::SQLBackingStore.
Return a pointer to an Atom associated with the given handle, if it exists; else return NULL.
Implemented in opencog::AtomspaceHTabler, and opencog::SQLBackingStore.
Return a vector containing the handles of the entire incoming set of the indicated handle.
Implemented in opencog::AtomspaceHTabler, and opencog::SQLBackingStore.
Return a pointer to a link of the indicated type and outset, if it exists; else return NULL.
Implemented in opencog::SQLBackingStore.
Return a pointer to a node of the indicated type and name, if it exists; else return NULL.
Implemented in opencog::AtomspaceHTabler, and opencog::SQLBackingStore.
|
virtual |
Returns true if the backing store will ignore this atom, either because it is of an ignorable type, or is a link which contains an atom that is of an ignorable type.
Definition at line 30 of file BackingStore.cc.
References python.create_atoms_by_type::a, ignoreType(), and opencog::LinkCast().
|
inlinevirtual |
Returns true if the backing store will ignore this type. This is used for performance optimization, as asking the backend to retreive an atom can take a long time. If an atom is of this given type, it will not be fetched.
Definition at line 105 of file BackingStore.h.
References _ignored_types.
Load all atoms of the given type, but only if they are not already in the AtomTable. (This avoids truth value merges between truth values stored in the backend, and truth values in the atomspace.)
Implemented in opencog::SQLBackingStore.
|
pure virtual |
Recursively store the atom and anything in it's outgoing set. If the atom is already in storage, this will update it's truth value, etc.
Implemented in opencog::AtomspaceHTabler, and opencog::SQLBackingStore.
std::set<Type> opencog::BackingStore::_ignored_types |
The set of ignored atom types.
Definition at line 119 of file BackingStore.h.