\r\n

51Degrees Pipeline Python  4.4

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

def  __init__ (self, data_file=None)
Constructor for an engine. More...
def  set_cache (self, cache)
Add a cache to an engine @type cashe: Cache. More...
def  set_restricted_properties (self, properties_list)
Add a subset of properties. More...
def  in_cache (self, flowdata)
A method to check if a flowdata's evidence is in the cache. More...
def  refresh (self, identifier)
def  process (self, flowdata)
Engine's core process function. More...
def  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. More...
def  register_data_file (self, data_file)
Register a data_file of the DataFile class with the engine @type data_file: DataFile. More...

Public Member Functions inherited from fiftyone_pipeline_core.flowelement.FlowElement

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

Public Attributes

 cache
 restricted_properties

Public Attributes inherited from fiftyone_pipeline_core.flowelement.FlowElement

 pipelines
 properties  datakey  exclude_from_messages

Constructor & Destructor Documentation

◆ __init__()

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

Member Function Documentation

◆ in_cache()

def 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()

def 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
pipeline - The pipeline the engine has been attached to

Reimplemented from fiftyone_pipeline_core.flowelement.FlowElement.

Reimplemented in fiftyone_pipeline_cloudrequestengine.cloudengine.CloudEngine.

◆ process()

def 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()

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

◆ register_data_file()

def 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_file - DataFile (such as for an on premise engine)

◆ set_cache()

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

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

Parameters
cache - Cache with get and set methods

◆ set_restricted_properties()

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

Add a subset of properties.

@type properties_list: string[]

Parameters
properties_list - An array of properties to include

Member Data Documentation

◆ cache

fiftyone_pipeline_engines.engine.Engine.cache

◆ data_file

fiftyone_pipeline_engines.engine.Engine.data_file

◆ restricted_properties

fiftyone_pipeline_engines.engine.Engine.restricted_properties
On This Page