Interface IAsyncProcessingPipelineSegmentGroup
- All Known Implementing Classes:
AsyncProcessingPipelineSegmentGroup,OperationPipelineSegmentGroup
public interface IAsyncProcessingPipelineSegmentGroup
The segment group of the DD pipeline. Can hold several segments with parallel execution, or single segment with exclusive execution.
For parallel executions there is a major limitation - only one DD segment of BM top object could be computed concurrently (this means that other contexts of this object belonging to other segments combined in a single group cannot be computed in parallel).
For parallel executions there is a major limitation - only one DD segment of BM top object could be computed concurrently (this means that other contexts of this object belonging to other segments combined in a single group cannot be computed in parallel).
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the group completellybooleanconfirmTaskCompletion(Object objectId) Confirms completion of a task from the current group.voiddeactivateContexts(String segmentId) Deactivates scheduled contexts in the pipeline group for a specified segmentgatherNextAvailableTask(Collection<AllowedComputations> allowedComputations) Gathers next available task.Gets the group multithreading policy.getLocks()Gets the set of current locks in the pipelineGets the active modal operation context in this group if anyGets an ordered list of registered segment ids for this group.Gets the type of the exclusive operation being run in the current groupGets running exclusive tasks if anyGets the set of running half-exclusive tasksgetSegment(String segmentId) Gets the pipeline segment from the groupgetStage()Gets a DD pipeline stage this group is belongs tobooleanhasAvaiableTasks(Collection<AllowedComputations> allowedComputations) Checks if the group has available tasks.booleanChecks if this group has priority tasks to computebooleanChecks if this group has any of important tasks being run at the momentbooleanChecks if the given group has any scheduled contexts,booleanChecks if the current group has active tasks being run at the moment.voidincreasePriority(String segmentId) Increase the priority of the segment.voidincreasePriority(String segmentId, Object objectId) Increases priority of a specific object DD segment.voidmerge(IAsyncProcessingPipelineSegmentGroup modalGroup) Merges the modal operation group back to the main pipeline groupvoidRemoves object from all segments of this group (if any).default voidRemoves object from a specified segment of this group (if any).voidSchedules the context into the group.voidscheduleOperation(OperationContext operationContext) Schedules the orchestrated operationvoidunlockTask(Object objectId) Unocks the task allowing the DD to compute it
-
Method Details
-
confirmTaskCompletion
Confirms completion of a task from the current group. As it's impossible to compute same object contexts for different segments simultaneously in a single group, the segment definition is not required.- Parameters:
bmObjectId- The identifier of the target top object to confirm task completion for.- Returns:
- True of the task was confirmed successfully. False in case if the task was absent in the target pipeline
-
gatherNextAvailableTask
Gathers next available task.- Parameters:
allowedOperations- The set of allowed operation types. May not benull- Returns:
- The next available task if any.
-
getGroupMultiThreadingComputePolicy
MultithreadingComputationPolicy getGroupMultiThreadingComputePolicy()Gets the group multithreading policy. The group always has single policy. In case if grouped segments has different policies, the group selects highest one.- Returns:
- The combined multithreading computation policy of the group.
-
getLocks
Gets the set of current locks in the pipeline- Returns:
- The set of current locks. May not be
null
-
getRegisteredSegmentIds
Collection<String> getRegisteredSegmentIds()Gets an ordered list of registered segment ids for this group.- Returns:
- The list of segment ids for async. DD pipeline segments belonging to this group.
-
getRunningExclusiveOperationType
OperationType getRunningExclusiveOperationType()Gets the type of the exclusive operation being run in the current group- Returns:
- The running exclusive operation type, if any.
nullotherwise
-
getRunningExclusiveTasks
Gets running exclusive tasks if any- Returns:
- The map of running exclusive tasks, never
null
-
getRunningHalfExclusiveTasks
Gets the set of running half-exclusive tasks- Returns:
- The set of tasks, never
null
-
getSegment
Gets the pipeline segment from the group- Parameters:
segmentId- The identifier of the segment- Returns:
- The segment, if presents. Could be
null
-
hasAvaiableTasks
Checks if the group has available tasks. Tasks are available in case if there are scheduled context(s) in at least one segment, and those contexts aren't blocked by currently computed DD segments (block based on the top object).- Parameters:
allowedOperations- Types of allowed operations (if any)- Returns:
- True if the next task is available; false otherwise.
-
hasPriorityTasks
boolean hasPriorityTasks()Checks if this group has priority tasks to compute- Returns:
- True if the group has priority tasks to compute
-
hasScheduledContexts
boolean hasScheduledContexts()Checks if the given group has any scheduled contexts,- Returns:
- True if any of group segments contains scheduled tasks; false otherwise.
-
hasUnfinishedBlockingTasks
boolean hasUnfinishedBlockingTasks()Checks if the current group has active tasks being run at the moment.- Returns:
- True in case if there are unfinished tasks belonging to this group being computed by DD subsystem.
-
increasePriority
Increase the priority of the segment.- Parameters:
segmentId- The DD segement to increase the priority for. Cannot benull
-
increasePriority
Increases priority of a specific object DD segment. Allows async. DD facility to compute this DD segment as soon as possible.- Parameters:
segmentId- The identifier of the DD segment.objectId- The identifier of the object.
-
remove
Removes object from all segments of this group (if any).- Parameters:
bmObjectId- The identifier of the object to remove pipeline registration for.
-
remove
Removes object from a specified segment of this group (if any).- Parameters:
segmentId- The target DD segment identifier. May not benullbmObjectId- The identifier of the object to remove pipeline registration for.
-
schedule
Schedules the context into the group. -
scheduleOperation
Schedules the orchestrated operation- Parameters:
operationContext- The context of the operation to schedule. May not benull
-
unlockTask
Unocks the task allowing the DD to compute it- Parameters:
bmObjectId- The target BM object identifier
-
getModalOperationContext
OperationContext getModalOperationContext()Gets the active modal operation context in this group if any- Returns:
- The active modal operation context if any.
nullotherwise
-
merge
Merges the modal operation group back to the main pipeline group- Parameters:
modalGroup- The modal pipeline group to merge. May not benull
-
clear
void clear()Clears the group completelly -
hasRunningImportantTasks
boolean hasRunningImportantTasks()Checks if this group has any of important tasks being run at the moment- Returns:
- True if the group has any of important tasks being run at the moment
-
getStage
DerivedDataSegmentBucket getStage()Gets a DD pipeline stage this group is belongs to- Returns:
- The DD pipeline stage of the group. May not be
null
-
deactivateContexts
Deactivates scheduled contexts in the pipeline group for a specified segment- Parameters:
segmentId- The segment to deactivate scheduled contexts for. Cannot benull
-