Detailed Description
The data update service keeps AspectEngine’s data files up to date.
- See also
- Specification
Inheritance diagram for fiftyone.pipeline.engines.services.DataUpdateService:
Collaboration diagram for fiftyone.pipeline.engines.services.DataUpdateService:
Classes | |
| enum | AutoUpdateStatus |
| Status code indicating the result of an update. More... | |
| class | DataUpdateCompleteArgs |
Public Member Functions | |
| AutoUpdateStatus | checkForUpdate (OnPremiseAspectEngine<? extends AspectData, ? extends AspectPropertyMetaData > engine, String dataFileIdentifier) |
| Check for an available download of a new data file, or a local data file newer than the one currently in use. | |
| AutoUpdateStatus | checkForUpdate (OnPremiseAspectEngine<? extends AspectData, ? extends AspectPropertyMetaData > engine) |
| Check for an available download of a new data file, or a local data file newer than the one currently in use. | |
| AutoUpdateStatus | updateFromMemory (AspectEngineDataFile engine, byte[] data) |
| Update the Engine with the byte array provided. | |
| void | onUpdateComplete (OnUpdateComplete onUpdateComplete) |
Add an event handler fired when a call to checkForUpdate(OnPremiseAspectEngine) is completed. | |
| void | registerDataFile (AspectEngineDataFile dataFile) |
| Register an engine to be automatically kept up to data. | |
| void | unregisterDataFile (AspectEngineDataFile dataFile) |
Un-register a data file which was registered with the registerDataFile(AspectEngineDataFile) method. | |
Member Function Documentation
◆ checkForUpdate() [1/2]
| AutoUpdateStatus fiftyone.pipeline.engines.services.DataUpdateService.checkForUpdate | ( | OnPremiseAspectEngine<? extends AspectData, ? extends AspectPropertyMetaData > | engine | ) |
Check for an available download of a new data file, or a local data file newer than the one currently in use.
If either is the case, then the engine is updated with the new data. The engine does not need to be registered with the service for this method to be used.
- Parameters
-
engine AspectEngineto try updating
- Returns
AutoUpdateStatus#AUTO_UPDATE_SUCCESSif the data file was successfully updated
Implemented in fiftyone.pipeline.engines.services.DataUpdateServiceDefault.
◆ checkForUpdate() [2/2]
| AutoUpdateStatus fiftyone.pipeline.engines.services.DataUpdateService.checkForUpdate | ( | OnPremiseAspectEngine<? extends AspectData, ? extends AspectPropertyMetaData > | engine, |
| String | dataFileIdentifier ) |
Check for an available download of a new data file, or a local data file newer than the one currently in use.
If either is the case, then the engine is updated with the new data. The engine does not need to be registered with the service for this method to be used.
- Parameters
-
engine AspectEngineto try updatingdataFileIdentifier the identifier of the data file to check for. If the engine has only one data file then this parameter is ignored
- Returns
AutoUpdateStatus#AUTO_UPDATE_SUCCESSif the data file was successfully updated
Implemented in fiftyone.pipeline.engines.services.DataUpdateServiceDefault.
◆ onUpdateComplete()
| void fiftyone.pipeline.engines.services.DataUpdateService.onUpdateComplete | ( | OnUpdateComplete | onUpdateComplete | ) |
Add an event handler fired when a call to checkForUpdate(OnPremiseAspectEngine) is completed.
- Parameters
-
onUpdateComplete event handler to call
Implemented in fiftyone.pipeline.engines.services.DataUpdateServiceDefault.
◆ registerDataFile()
| void fiftyone.pipeline.engines.services.DataUpdateService.registerDataFile | ( | AspectEngineDataFile | dataFile | ) |
Register an engine to be automatically kept up to data.
Tasks will be scheduled for downloading and updating when new data files are expected. A regular task is also run to update an engine if the local data file is newer than the one in use.
- Parameters
-
dataFile data file to register
Implemented in fiftyone.pipeline.engines.services.DataUpdateServiceDefault.
◆ unregisterDataFile()
| void fiftyone.pipeline.engines.services.DataUpdateService.unregisterDataFile | ( | AspectEngineDataFile | dataFile | ) |
Un-register a data file which was registered with the registerDataFile(AspectEngineDataFile) method.
- Parameters
-
dataFile data file to un-register
Implemented in fiftyone.pipeline.engines.services.DataUpdateServiceDefault.
◆ updateFromMemory()
| AutoUpdateStatus fiftyone.pipeline.engines.services.DataUpdateService.updateFromMemory | ( | AspectEngineDataFile | engine, |
| byte[] | data ) |
Update the Engine with the byte array provided.
If the Engine is is using data on disk, then the file is replaced with the new data.
- Parameters
-
engine AspectEngineto try updatingdata new data file in memory
- Returns
AutoUpdateStatus#AUTO_UPDATE_SUCCESSif the data file was successfully updated
Implemented in fiftyone.pipeline.engines.services.DataUpdateServiceDefault.
