◆ constructor()
Engine::constructor | ( | { cache, restrictedProperties, dataFile } = {}
| ) |
inline
Constructor for an Engine.
- Parameters
-
- {object} - options options for the engine
- {DataFile} - options.dataFile an optional datafile to add to the engine
- {DataKeyedCache} - options.cache instance of a DataKeyedCache
- {Array} - options.restrictedProperties specific list of properties to fetch elementData for
◆ inCache()
Engine::inCache ( flowData ) inlineChecks cache and returns cached result if found.
- Parameters
-
- {FlowData} - flowData checks if a FlowData's evidence is already in the cache and processing can be bypassed
- Returns
- {boolean} whether in cache
◆ process()
Engine::process ( flowData ) inlineAn engine's process function checks cache for an item (calling inCache) If found it returns the cached object If not found it runs the standard processInternal function and adds it to the cache (if a cache is present)
- Parameters
-
- {FlowData} - flowData FlowData to process
- Returns
- {undefined} result of processing
◆ refresh()
Engine::refresh ( ) inlineCallback which runs when an attached DataFile is updated Needs to be overriden by a specific engine to do anything.
- Returns
- {void}
◆ registerDataFile()
Engine::registerDataFile ( dataFile ) inlineFunction to attach a DataFile to the engine and register it with a DataFileUpdateService if needed.
- Parameters
-
- {DataFile} - dataFile the datafile to register