Class BuildIndexScheduledTask
java.lang.Object
com.orchestranetworks.scheduler.ScheduledTask
com.apgar.common.lib.scheduledtask.BuildIndexScheduledTask
This task builds indices for the specified dataspaces in dataspaces or all non-technical dataspaces that have not been marked for
exclusion.
To utilize this functionality, create a task in the Tasks table of the Task Scheduler under the Administration tab with the following specifications:
- Module: The module that contains this JAR file.
- Class Name: com.apgar.common.lib.scheduledtask.BuildIndexScheduledTask
- Optional Parameters:
- dataspaces: Names of the dataspaces for which the index needs to be built, separated by semicolons (;). If not specified, indices for all non-technical dataspaces will be built.
- excludeRegExp: A regular expression to exclude certain dataspaces based on naming conventions. For example, use .*\d.* to exclude dataspaces with numbers in their names (child dataspaces). If not specified, no dataspaces will be excluded.
- includeTechnicalDataspaces: Indicator specifying whether technical dataspaces are included or excluded from indexing.
The execution report will include information about the task's start and end, the current dataspace being indexed, and warnings if any of the specified dataspaces do not exist or if datasets cannot be indexed due to severe errors.
- Author:
- APGAR Consulting
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(ScheduledExecutionContext context) Builds indices for the specified dataspaces, if provided, or for all non-technical dataspaces if none are specified.Gets the names of the dataspaces for which the index needs to be built.Gets the regular expression used to exclude certain dataspaces from indexing.booleanChecks whether technical dataspaces should be included in indexing.voidsetDataspaces(String dataspaces) Sets the names of the dataspaces for which the index needs to be built.voidsetExcludeRegExp(String excludeRegExp) Sets the regular expression to exclude certain dataspaces from indexing.voidsetIncludeTechnicalDataspaces(boolean includeTechnicalDataspaces) Specifies whether technical dataspaces should be included in indexing.Methods inherited from class com.orchestranetworks.scheduler.ScheduledTask
handleBeforeInterrupting, handleBeforePausing, handleBeforeResuming, isInterruptable, isPausable, validate, zza, zza, zza, zzb, zzb, zzc, zzd
-
Constructor Details
-
BuildIndexScheduledTask
public BuildIndexScheduledTask()
-
-
Method Details
-
execute
public void execute(ScheduledExecutionContext context) throws OperationException, ScheduledTaskInterruption Builds indices for the specified dataspaces, if provided, or for all non-technical dataspaces if none are specified.- Specified by:
executein classScheduledTask- Parameters:
context- context of the scheduled task execution- Throws:
OperationException- if an error occurs during deletionScheduledTaskInterruption- if the scheduled task is interrupted
-
getDataspaces
Gets the names of the dataspaces for which the index needs to be built.- Returns:
- a semicolon-separated string of dataspace names
-
setDataspaces
Sets the names of the dataspaces for which the index needs to be built.- Parameters:
dataspaces- a semicolon-separated string of dataspace names
-
getExcludeRegExp
Gets the regular expression used to exclude certain dataspaces from indexing.- Returns:
- the regular expression for exclusion
-
setExcludeRegExp
Sets the regular expression to exclude certain dataspaces from indexing.- Parameters:
excludeRegExp- the regular expression for exclusion
-
getIncludeTechnicalDataspaces
public boolean getIncludeTechnicalDataspaces()Checks whether technical dataspaces should be included in indexing.- Returns:
- true if technical dataspaces are included, false otherwise
-
setIncludeTechnicalDataspaces
public void setIncludeTechnicalDataspaces(boolean includeTechnicalDataspaces) Specifies whether technical dataspaces should be included in indexing.- Parameters:
includeTechnicalDataspaces- true to include technical dataspaces, false to exclude them
-