Summer.Batch.Extra.IO.GdgResourceLoader Class Reference

Resource loader that supports generation data groups (GDG) with the "gdg:" URI protocol. Other URIs or paths without protocol are delegated to ResourceLoader. More...

Inheritance diagram for Summer.Batch.Extra.IO.GdgResourceLoader:
Summer.Batch.Common.IO.ResourceLoader

Public Member Functions

 GdgResourceLoader (SettingsManager settings)
 Default constructor. Checks the options in the settings manager. More...
 
- Public Member Functions inherited from Summer.Batch.Common.IO.ResourceLoader
IResource GetResource (string path)
 Resolves a path as a single resource. If the path matches several resources, one is returned arbitrarily. More...
 
IList< IResourceGetResources (string paths)
 Resolves a path and returns all the matched resources. More...
 

Protected Member Functions

override IEnumerable< IResourceDoGetResources (string path)
 Resolves a single path to resources. More...
 

Detailed Description

Resource loader that supports generation data groups (GDG) with the "gdg:" URI protocol. Other URIs or paths without protocol are delegated to ResourceLoader.

Generation data groups are supported with the following syntax:

gdg:path/to/file(<number>)[.<extension>]

<number> refers to a file in the group. The latest version existing before the job is start is version 0. The previous one is -1, and so on. The version that has being written in the current job can be referenced with 1 (or +1).

It is possible to limit the number of files in a group by using a setting named "gdg-options". This setting must be a string containing comma separated values with the following repeatable pattern:

path/to/file.txt,limit=<limit>[,mode=<mode>]

<limit> is the maximum number of files in the group and <mode> is either "empty" or "noempty". If no mode is specified, "noempty" is the default. In the "empty" mode, all previous files are moved when the limit is reached, whereas in "noempty" mode the oldest files are removed to keep the number of files at the limit.

Constructor & Destructor Documentation

Summer.Batch.Extra.IO.GdgResourceLoader.GdgResourceLoader ( SettingsManager  settings)

Default constructor. Checks the options in the settings manager.

Member Function Documentation

override IEnumerable<IResource> Summer.Batch.Extra.IO.GdgResourceLoader.DoGetResources ( string  path)
protectedvirtual

Resolves a single path to resources.

Parameters
paththe path to resolve
Returns
the matched resources

Reimplemented from Summer.Batch.Common.IO.ResourceLoader.


The documentation for this class was generated from the following file:
  • Summer.Batch.Extra/IO/GdgResourceLoader.cs