\r\n

51Degrees Pipeline .NET  4.4

51Degrees Pipeline for .NET

FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine > Class Template Reference

Detailed Description

Abstract base class that exposes the common options that all on-premise engine builders using a single data file should make use of.

Template Parameters
TBuilder - The specific builder type to use as the return type from the fluent builder methods.
TEngine - The type of the engine that this builder will build
Type Constraints
TBuilder :OnPremiseAspectEngineBuilderBase 
TBuilder :TBuilder 
TBuilder :TEngine 
TEngine :IOnPremiseAspectEngine 

Inheritance diagram for FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >:

[legend]

Collaboration diagram for FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >:

[legend]

Public Member Functions

 SingleFileAspectEngineBuilderBase (IDataUpdateService dataUpdateService)
Constructor More...
virtual TEngine  Build ([DefaultValue("No default, value must be supplied")] string datafile, [DefaultValue("No default, value must be supplied")] bool createTempDataCopy)
Build an engine using the current options and the specified data file. More...
virtual TEngine  Build ([CodeConfigOnly] Stream data)
Build an engine using the current options and the specified byte array. More...
TBuilder  SetDataUpdateUrl (string url)
Configure the engine to use the specified URL when looking for an updated data file. More...
TBuilder  SetDataUpdateUrl (Uri url)
Configure the engine to use the specified URL when looking for an updated data file. More...
TBuilder  SetDataUpdateUrlFormatter (IDataUpdateUrlFormatter formatter)
Specify a IDataUpdateUrlFormatter to be used by the DataUpdateService when building the complete URL to query for updated data. More...
TBuilder  SetDataUpdateUseUrlFormatter (IDataUpdateUrlFormatter formatter)
Enable/Disable the UrlFormatter to be used when this engine's data file is updated. More...
TBuilder  SetDataUpdateUseUrlFormatter (bool useFormatter)
Enable or disable the IDataUpdateUrlFormatter to be used when creating the complete URL to request updates from. More...
TBuilder  SetDataUpdateVerifyMd5 (bool verify)
Set a value indicating if the DataUpdateService should expect the response from the data update URL to contain a 'content-md5' HTTP header that can be used to verify the integrity of the content. More...
TBuilder  SetDataUpdateDecompress (bool decompress)
Set a value indicating if the DataUpdateService should expect content from the configured data update URL to be compressed or not. More...
TBuilder  SetAutoUpdate (bool enabled)
Enable or disable automatic updates for this engine. More...
TBuilder  SetDataFileSystemWatcher (bool enabled)
The DataUpdateService has the ability to watch a data file on disk and automatically refresh the engine as soon as the file is updated. More...
TBuilder  SetUpdatePollingInterval (int pollingIntervalSeconds)
Set the time between checks for a new data file made by the DataUpdateService. More...
TBuilder  SetUpdatePollingInterval (TimeSpan pollingInterval)
Set the time between checks for a new data file made by the DataUpdateService. More...
TBuilder  SetUpdateRandomisationMax (int maximumDeviationSeconds)
A random element can be added to the DataUpdateService polling interval. More...
TBuilder  SetUpdateRandomisationMax (TimeSpan maximumDeviation)
A random element can be added to the DataUpdateService polling interval. More...
TBuilder  SetVerifyIfModifiedSince (bool enabled)
Set if DataUpdateService sends the If-Modified-Since header in the request for a new data file. More...
TBuilder  SetDataUpdateLicenseKey (string key)
Set the license key to use when updating the Engine's data file. More...
TBuilder  SetDataUpdateLicenseKeys (string[] keys)
Set the license keys to use when updating the Engine's data file. More...
TBuilder  SetDataUpdateOnStartup (bool enabled)
Configure the data file to update on startup or not. More...

Public Member Functions inherited from FiftyOne.Pipeline.Engines.FlowElements.OnPremiseAspectEngineBuilderBase< TBuilder, TEngine >

 OnPremiseAspectEngineBuilderBase (IDataUpdateService dataUpdateService)
Constructor More...
TBuilder  AddDataFile (IDataFileConfiguration configuration)
Add a data file for this engine to use. More...
TBuilder  SetTempDirPath (string dirPath)
Set the temporary path to use when the engine needs to create temporary files. More...
abstract TBuilder  SetPerformanceProfile (PerformanceProfiles profile)
Set the performance profile that the engine should use. More...

Public Member Functions inherited from FiftyOne.Pipeline.Engines.FlowElements.AspectEngineBuilderBase< TBuilder, TEngine >

TBuilder  SetLazyLoading (LazyLoadingConfiguration lazyLoadingConfig)
Configure lazy loading of results. More...
TBuilder  SetLazyLoadingTimeout (int timeoutMs)
Configure lazy loading of results. More...
virtual TBuilder  SetCache (CacheConfiguration cacheConfig)
Configure the results cache that will be used by the Pipeline to cache results from this engine. More...
virtual TBuilder  SetCacheSize (int cacheSize)
Configure the results cache that will be used by the Pipeline to cache results from this engine. More...
virtual TBuilder  SetCacheHitOrMiss (bool cacheHitOrMiss)
Configure the engine to flag whether an element data originates from the engine cache. More...
TBuilder  SetProperties (List< string > properties)
Configure the properties that the engine will populate in the response. More...
TBuilder  SetProperty (string property)
Add a property to the list of properties that the engine will populate in the response. More...

Protected Member Functions

virtual TEngine  Build ()
Build an engine using the configured options. More...

Protected Member Functions inherited from FiftyOne.Pipeline.Engines.FlowElements.OnPremiseAspectEngineBuilderBase< TBuilder, TEngine >

virtual AspectEngineDataFile  NewAspectEngineDataFile ()
Create a new instance of the AspectEngineDataFile instances used by the engine associated with this builder. More...
override void  PreCreateEngine ()
Called by the 'BuildEngine' method to handle anything that needs doing before the engine is built. More...
override void  ConfigureEngine (TEngine engine)
Called by the 'BuildEngine' method to handle configuration of the engine after it is built. More...

Protected Member Functions inherited from FiftyOne.Pipeline.Engines.FlowElements.AspectEngineBuilderBase< TBuilder, TEngine >

abstract TEngine  NewEngine (List< string > properties)
Called by the BuildEngine() method to handle creation of the engine instance. More...
TEngine  BuildEngine ()
Build an engine using the configured options. More...

Constructor & Destructor Documentation

Member Function Documentation

◆ Build() [1/3]

virtual TEngine FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.Build ( [DefaultValue("No default, value must be supplied")] string   datafile,
[DefaultValue("No default, value must be supplied")] bool   createTempDataCopy  
)
virtual

Build an engine using the current options and the specified data file.

Also registers the data file with the data update service.

Parameters
datafile -

The path to the data file location. If a relative path is supplied then the location is determined as relative to the current working directory as supplied by Directory.GetCurrentDirectory. Whether the path is relative or absolute, if there is no file at the specified location then, before starting processing, the engine will download the latest version of the file using the configured auto-update settings.

Parameters
createTempDataCopy - If true, the engine will create a copy of the data file in a temporary location rather than using the file provided directly. If not loading all data into memory, this is required for automatic data updates to occur.
Returns
An IAspectEngine

◆ Build() [2/3]

virtual TEngine FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.Build ( [CodeConfigOnly] Stream   data )
virtual

Build an engine using the current options and the specified byte array.

Also registers the data file with the data update service.

Parameters
data - A Stream containing the data that would normally be in a data file. If this argument is null then, before starting processing, the engine will download the latest version of the datafile using the configured auto-update settings.
Returns
An IAspectEngine.

◆ SetAutoUpdate()

TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetAutoUpdate ( bool   enabled )

Enable or disable automatic updates for this engine.

Parameters
enabled - If true, the engine will update it's data file with no manual intervention. If false, the engine will never update it's data file unless the manual update method is called on IDataUpdateService
Returns
This builder instance.

◆ SetDataFileSystemWatcher()

TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetDataFileSystemWatcher ( bool   enabled )

The DataUpdateService has the ability to watch a data file on disk and automatically refresh the engine as soon as the file is updated.

This setting enables/disables that feature.

The AutoUpdate feature must also be enabled in order for the file system watcher to work. If the engine is built from a byte[] then this setting does nothing.

Parameters
enabled - The cache configuration to use.
Returns
This builder instance.

◆ SetDataUpdateDecompress()

TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetDataUpdateDecompress ( bool   decompress )

Set a value indicating if the DataUpdateService should expect content from the configured data update URL to be compressed or not.

Parameters
decompress - True if the content from the data update URL needs to be decompressed. False otherwise.
Returns
This builder instance.

◆ SetDataUpdateLicenseKey()

TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetDataUpdateLicenseKey ( string   key )

Set the license key to use when updating the Engine's data file.

Parameters
key - 51Degrees license key. This parameter can be set to null, but doing so will disable automatic updates for this file.
Returns
This builder

◆ SetDataUpdateOnStartup()

TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetDataUpdateOnStartup ( bool   enabled )

Configure the data file to update on startup or not.

Parameters
enabled - If true then when this file is registered with the data update service, it will immediately try to download the latest copy of the file. This action will block execution until the download is complete and the engine has loaded the new file.
Returns
This builder

◆ SetDataUpdateUseUrlFormatter() [2/2]

TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetDataUpdateUseUrlFormatter ( bool   useFormatter )

Enable or disable the IDataUpdateUrlFormatter to be used when creating the complete URL to request updates from.

Setting this to false is equivalent to calling SetDataUpdateUrlFormatter(IDataUpdateUrlFormatter) with a null parameter. It is available as a separate method in order to support disabling the formatter from a configuration file.

Parameters
useFormatter - True to use the specified formatter (default). False to prevent the specified formatter from being used.
Returns
This builder instance.

◆ SetDataUpdateVerifyMd5()

TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetDataUpdateVerifyMd5 ( bool   verify )

Set a value indicating if the DataUpdateService should expect the response from the data update URL to contain a 'content-md5' HTTP header that can be used to verify the integrity of the content.

Parameters
verify - True if the content should be verified with the Md5 hash. False otherwise.
Returns
This builder instance.

◆ SetUpdatePollingInterval() [1/2]

TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetUpdatePollingInterval ( int   pollingIntervalSeconds )

Set the time between checks for a new data file made by the DataUpdateService.

Default = 30 minutes.

Generally, the DataUpdateService will not check for a new data file until the 'expected update time' that is stored in the current data file. This interval is the time to wait between checks after that time if no update is initially found. If automatic updates are disabled then this setting does nothing.

Parameters
pollingIntervalSeconds - The number of seconds between checks.
Returns
This builder instance.

◆ SetUpdatePollingInterval() [2/2]

TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetUpdatePollingInterval ( TimeSpan   pollingInterval )

Set the time between checks for a new data file made by the DataUpdateService.

Default = 30 minutes.

Generally, the DataUpdateService will not check for a new data file until the 'expected update time' that is stored in the current data file. This interval is the time to wait between checks after that time if no update is initially found. If automatic updates are disabled then this setting does nothing.

Parameters
pollingInterval - The time between checks.
Returns
This builder instance.

◆ SetUpdateRandomisationMax() [1/2]

TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetUpdateRandomisationMax ( int   maximumDeviationSeconds )

A random element can be added to the DataUpdateService polling interval.

This option sets the maximum length of this random addition. Default = 10 minutes.

Parameters
maximumDeviationSeconds - The maximum time added to the data update polling interval.
Returns
This builder instance.

◆ SetUpdateRandomisationMax() [2/2]

TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetUpdateRandomisationMax ( TimeSpan   maximumDeviation )

A random element can be added to the DataUpdateService polling interval.

This option sets the maximum length of this random addition. Default = 10 minutes.

Parameters
maximumDeviation - The maximum time added to the data update polling interval.
Returns
This builder instance.