Package com.evolveum.midpoint.task.api
Class StaticTaskPartitionsDefinition
- java.lang.Object
-
- com.evolveum.midpoint.task.api.StaticTaskPartitionsDefinition
-
- All Implemented Interfaces:
TaskPartitionsDefinition
public class StaticTaskPartitionsDefinition extends Object implements TaskPartitionsDefinition
Task partitions definition based on statically configured values. More restricted but easier to use. However, it is extensible by subclassing - in that way, some values can be provided statically while others on-demand.- Author:
- mederly
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classStaticTaskPartitionsDefinition.StaticTaskPartition-
Nested classes/interfaces inherited from interface com.evolveum.midpoint.task.api.TaskPartitionsDefinition
TaskPartitionsDefinition.TaskPartitionDefinition
-
-
Constructor Summary
Constructors Constructor Description StaticTaskPartitionsDefinition(@NotNull TaskPartitionsDefinitionType definition, @NotNull PrismObjectDefinition<TaskType> taskDefinition)StaticTaskPartitionsDefinition(@NotNull TaskPartitionsDefinitionType data, @Nullable List<TaskPartitionsDefinition.TaskPartitionDefinition> partitionsOverride, @NotNull PrismObjectDefinition<TaskType> taskDefinition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCount(Task masterTask)Number of partitions.TaskExecutionEnvironmentTypegetExecutionEnvironment(Task masterTask)Execution environment to be used in subtask.StringgetHandlerUri(Task masterTask)Handler URI for the subtask.StringgetName(Task masterTask)Template for the subtask name.@NotNull Collection<ItemDelta<?,?>>getOtherDeltas(Task masterTask)Deltas to be applied to subtask after its creation.@NotNull TaskPartitionsDefinition.TaskPartitionDefinitiongetPartition(Task masterTask, int index)Partition with a given number, starting at 1.TaskWorkManagementTypegetWorkManagement(Task masterTask)Work management for the subtasks.BooleanisCopyMasterExtension(Task masterTask)Whether to copy extension from master task into subtask.booleanisDurablePartitions(Task masterTask)Whether the partitions should be durable i.e.booleanisSequentialExecution(Task masterTask)Whether the subtasks should be executed sequentially.
-
-
-
Constructor Detail
-
StaticTaskPartitionsDefinition
public StaticTaskPartitionsDefinition(@NotNull @NotNull TaskPartitionsDefinitionType data, @Nullable @Nullable List<TaskPartitionsDefinition.TaskPartitionDefinition> partitionsOverride, @NotNull @NotNull PrismObjectDefinition<TaskType> taskDefinition)
-
StaticTaskPartitionsDefinition
public StaticTaskPartitionsDefinition(@NotNull @NotNull TaskPartitionsDefinitionType definition, @NotNull @NotNull PrismObjectDefinition<TaskType> taskDefinition)
-
-
Method Detail
-
getCount
public int getCount(Task masterTask)
Description copied from interface:TaskPartitionsDefinitionNumber of partitions.- Specified by:
getCountin interfaceTaskPartitionsDefinition
-
isSequentialExecution
public boolean isSequentialExecution(Task masterTask)
Description copied from interface:TaskPartitionsDefinitionWhether the subtasks should be executed sequentially.- Specified by:
isSequentialExecutionin interfaceTaskPartitionsDefinition
-
isDurablePartitions
public boolean isDurablePartitions(Task masterTask)
Description copied from interface:TaskPartitionsDefinitionWhether the partitions should be durable i.e. whether they should persist through master task restarts. This is useful e.g. for partitioned validity scanner because each partition keeps its own last scan timestamp. (EXPERIMENTAL)- Specified by:
isDurablePartitionsin interfaceTaskPartitionsDefinition
-
getName
public String getName(Task masterTask)
Description copied from interface:TaskPartitionsDefinitionTemplate for the subtask name. The default is {masterTaskName} ({index})- Specified by:
getNamein interfaceTaskPartitionsDefinition
-
getHandlerUri
public String getHandlerUri(Task masterTask)
Description copied from interface:TaskPartitionsDefinitionHandler URI for the subtask. The default is {masterTaskHandlerUri}#{index}- Specified by:
getHandlerUriin interfaceTaskPartitionsDefinition
-
getWorkManagement
public TaskWorkManagementType getWorkManagement(Task masterTask)
Description copied from interface:TaskPartitionsDefinitionWork management for the subtasks.- Specified by:
getWorkManagementin interfaceTaskPartitionsDefinition
-
getExecutionEnvironment
public TaskExecutionEnvironmentType getExecutionEnvironment(Task masterTask)
Description copied from interface:TaskPartitionsDefinitionExecution environment to be used in subtask.- Specified by:
getExecutionEnvironmentin interfaceTaskPartitionsDefinition
-
isCopyMasterExtension
public Boolean isCopyMasterExtension(Task masterTask)
Description copied from interface:TaskPartitionsDefinitionWhether to copy extension from master task into subtask.- Specified by:
isCopyMasterExtensionin interfaceTaskPartitionsDefinition
-
getOtherDeltas
@NotNull public @NotNull Collection<ItemDelta<?,?>> getOtherDeltas(Task masterTask)
Description copied from interface:TaskPartitionsDefinitionDeltas to be applied to subtask after its creation. Applied before strategy.otherDeltas.- Specified by:
getOtherDeltasin interfaceTaskPartitionsDefinition
-
getPartition
@NotNull public @NotNull TaskPartitionsDefinition.TaskPartitionDefinition getPartition(Task masterTask, int index)
Description copied from interface:TaskPartitionsDefinitionPartition with a given number, starting at 1.- Specified by:
getPartitionin interfaceTaskPartitionsDefinition
-
-