51Degrees Pipeline for Python

fiftyone_pipeline_engines.engine.Engine Class Reference

Detailed Description

An engine is an extension of the FlowElement class that adds extra functionality.

Inheritance diagram for fiftyone_pipeline_engines.engine.Engine:

[legend]

Collaboration diagram for fiftyone_pipeline_engines.engine.Engine:

[legend]

Public Member Functions

 __init__ (self, data_file=None)
 Constructor for an engine.
 set_cache (self, cache)
 Add a cache to an engine @type cashe: Cache.
 set_restricted_properties (self, properties_list)
 Add a subset of properties.
 in_cache (self, flowdata)
 A method to check if a flowdata's evidence is in the cache.
 refresh (self, identifier)
 process (self, flowdata)
 Engine's core process function.
 on_registration (self, pipeline)
 Called when an engine is registered with a pipeline and if there is a data file, a data file update service is attached to the parent pipeline.
 close (self)
 Stop the checks and updates of the engine's data file, whose timers would otherwise keep the engine alive.
 register_data_file (self, data_file)
 Register a data_file of the DataFile class with the engine @type data_file: DataFile.

Public Member Functions inherited from fiftyone_pipeline_core.flowelement.FlowElement

 __init__ (self)
 List of Pipelines the FlowElement has been added to.
 get_evidence_key_filter (self)
 Filter FlowData evidence using the FlowElement's EvidenceKeyFilter.
 filter_evidence (self, flowdata)
 Filter FlowData evidence using the FlowElement's EvidenceKeyFilter.
 filter_evidence_key (self, key)
 Filter FlowData.evidence using the flowElement's EvidenceKeyFilter with the property key of evidence of interest.
 process_internal (self, flowdata)
 The method behind FlowElement.Process - it is called by the process() function.
 get_properties (self)
 Get the FlowElement.properties of a FlowElement.

Public Attributes

 data_file = data_file
 cache = cache
 restricted_properties = properties_list

Public Attributes inherited from fiftyone_pipeline_core.flowelement.FlowElement

list pipelines = []
dict properties = {}
str datakey = ""
bool exclude_from_messages = False

Additional Inherited Members

Protected Member Functions inherited from fiftyone_pipeline_core.flowelement.FlowElement

 _log (self, level, message)

Constructor & Destructor Documentation

◆ __init__()

fiftyone_pipeline_engines.engine.Engine.__init__ ( self,
data_file = None )

Constructor for an engine.

Member Function Documentation

◆ close()

fiftyone_pipeline_engines.engine.Engine.close ( self)

Stop the checks and updates of the engine's data file, whose timers would otherwise keep the engine alive.

Engines that hold native data release it as well.

Reimplemented from fiftyone_pipeline_core.flowelement.FlowElement.

Reimplemented in fiftyone_pipeline_engines_fiftyone.share_usage.ShareUsage.

◆ in_cache()

fiftyone_pipeline_engines.engine.Engine.in_cache ( self,
flowdata )

A method to check if a flowdata's evidence is in the cache.

@type FlowData: FlowData

Parameters
FlowData

@rtype: bool

Returns
: True or false: a flowdata's evidence is in the cache

◆ on_registration()

fiftyone_pipeline_engines.engine.Engine.on_registration ( self,
pipeline )

Called when an engine is registered with a pipeline and if there is a data file, a data file update service is attached to the parent pipeline.

@type pipeline: Pipeline

Parameters
pipelineThe pipeline the engine has been attached to

Reimplemented from fiftyone_pipeline_core.flowelement.FlowElement.

Reimplemented in fiftyone_pipeline_cloudrequestengine.cloudengine.CloudEngine.

◆ process()

fiftyone_pipeline_engines.engine.Engine.process ( self,
flowdata )

Engine's core process function.

Calls specific overriden processInternal methods but wraps it in a cache check and a cache put

@type flowdata: FlowData

Parameters
flowdata

Reimplemented from fiftyone_pipeline_core.flowelement.FlowElement.

◆ refresh()

fiftyone_pipeline_engines.engine.Engine.refresh ( self,
identifier )

◆ register_data_file()

fiftyone_pipeline_engines.engine.Engine.register_data_file ( self,
data_file )

Register a data_file of the DataFile class with the engine @type data_file: DataFile.

Parameters
data_fileDataFile (such as for an on premise engine)

◆ set_cache()

fiftyone_pipeline_engines.engine.Engine.set_cache ( self,
cache )

Add a cache to an engine @type cashe: Cache.

Parameters
cacheCache with get and set methods

◆ set_restricted_properties()

fiftyone_pipeline_engines.engine.Engine.set_restricted_properties ( self,
properties_list )

Add a subset of properties.

@type properties_list: string[]

Parameters
properties_listAn array of properties to include

Member Data Documentation

◆ cache

fiftyone_pipeline_engines.engine.Engine.cache = cache

◆ data_file

fiftyone_pipeline_engines.engine.Engine.data_file = data_file

◆ restricted_properties

fiftyone_pipeline_engines.engine.Engine.restricted_properties = properties_list