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 class
StaticTaskPartitionsDefinition.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 int
getCount(Task masterTask)
Number of partitions.TaskExecutionEnvironmentType
getExecutionEnvironment(Task masterTask)
Execution environment to be used in subtask.String
getHandlerUri(Task masterTask)
Handler URI for the subtask.String
getName(Task masterTask)
Template for the subtask name.@NotNull Collection<ItemDelta<?,?>>
getOtherDeltas(Task masterTask)
Deltas to be applied to subtask after its creation.@NotNull TaskPartitionsDefinition.TaskPartitionDefinition
getPartition(Task masterTask, int index)
Partition with a given number, starting at 1.TaskWorkManagementType
getWorkManagement(Task masterTask)
Work management for the subtasks.Boolean
isCopyMasterExtension(Task masterTask)
Whether to copy extension from master task into subtask.boolean
isDurablePartitions(Task masterTask)
Whether the partitions should be durable i.e.boolean
isSequentialExecution(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:TaskPartitionsDefinition
Number of partitions.- Specified by:
getCount
in interfaceTaskPartitionsDefinition
-
isSequentialExecution
public boolean isSequentialExecution(Task masterTask)
Description copied from interface:TaskPartitionsDefinition
Whether the subtasks should be executed sequentially.- Specified by:
isSequentialExecution
in interfaceTaskPartitionsDefinition
-
isDurablePartitions
public boolean isDurablePartitions(Task masterTask)
Description copied from interface:TaskPartitionsDefinition
Whether 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:
isDurablePartitions
in interfaceTaskPartitionsDefinition
-
getName
public String getName(Task masterTask)
Description copied from interface:TaskPartitionsDefinition
Template for the subtask name. The default is {masterTaskName} ({index})- Specified by:
getName
in interfaceTaskPartitionsDefinition
-
getHandlerUri
public String getHandlerUri(Task masterTask)
Description copied from interface:TaskPartitionsDefinition
Handler URI for the subtask. The default is {masterTaskHandlerUri}#{index}- Specified by:
getHandlerUri
in interfaceTaskPartitionsDefinition
-
getWorkManagement
public TaskWorkManagementType getWorkManagement(Task masterTask)
Description copied from interface:TaskPartitionsDefinition
Work management for the subtasks.- Specified by:
getWorkManagement
in interfaceTaskPartitionsDefinition
-
getExecutionEnvironment
public TaskExecutionEnvironmentType getExecutionEnvironment(Task masterTask)
Description copied from interface:TaskPartitionsDefinition
Execution environment to be used in subtask.- Specified by:
getExecutionEnvironment
in interfaceTaskPartitionsDefinition
-
isCopyMasterExtension
public Boolean isCopyMasterExtension(Task masterTask)
Description copied from interface:TaskPartitionsDefinition
Whether to copy extension from master task into subtask.- Specified by:
isCopyMasterExtension
in interfaceTaskPartitionsDefinition
-
getOtherDeltas
@NotNull public @NotNull Collection<ItemDelta<?,?>> getOtherDeltas(Task masterTask)
Description copied from interface:TaskPartitionsDefinition
Deltas to be applied to subtask after its creation. Applied before strategy.otherDeltas.- Specified by:
getOtherDeltas
in interfaceTaskPartitionsDefinition
-
getPartition
@NotNull public @NotNull TaskPartitionsDefinition.TaskPartitionDefinition getPartition(Task masterTask, int index)
Description copied from interface:TaskPartitionsDefinition
Partition with a given number, starting at 1.- Specified by:
getPartition
in interfaceTaskPartitionsDefinition
-
-