Class AsyncProcessingPipelineSegmentGroup
java.lang.Object
com._1c.g5.v8.internal.derived.pipeline.AsyncProcessingPipelineSegmentGroup
- All Implemented Interfaces:
IAsyncProcessingPipelineSegmentGroup
public class AsyncProcessingPipelineSegmentGroup
extends Object
implements IAsyncProcessingPipelineSegmentGroup
The group of segments which have the same priority and execution strategy (exclusive/parallel)
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of the DD async. pipeline segment group. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new segment to the group.voidclear()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 groupgetSegment(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 externalGroup) Merges the modal operation group back to the main pipeline groupvoidRemoves object from all segments of this group (if any).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 itMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com._1c.g5.v8.internal.derived.pipeline.IAsyncProcessingPipelineSegmentGroup
getRunningExclusiveTasks, getRunningHalfExclusiveTasks
-
Constructor Details
-
AsyncProcessingPipelineSegmentGroup
Creates an instance of the DD async. pipeline segment group.- Parameters:
stage- The target DD pipeline bucket. May not benull
-
-
Method Details
-
addSegment
Adds a new segment to the group.- Parameters:
segment- The pipeline segment to add.
-
confirmTaskCompletion
Description copied from interface:IAsyncProcessingPipelineSegmentGroupConfirms 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.- Specified by:
confirmTaskCompletionin interfaceIAsyncProcessingPipelineSegmentGroup- Returns:
- True of the task was confirmed successfully. False in case if the task was absent in the target pipeline
-
gatherNextAvailableTask
public Pair<String,Object> gatherNextAvailableTask(Collection<AllowedComputations> allowedComputations) Gathers next available task.- Specified by:
gatherNextAvailableTaskin interfaceIAsyncProcessingPipelineSegmentGroup- Returns:
- The next available task if any.
-
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.- Specified by:
getGroupMultiThreadingComputePolicyin interfaceIAsyncProcessingPipelineSegmentGroup- Returns:
- The combined multithreading computation policy of the group.
-
getLocks
Description copied from interface:IAsyncProcessingPipelineSegmentGroupGets the set of current locks in the pipeline- Specified by:
getLocksin interfaceIAsyncProcessingPipelineSegmentGroup- Returns:
- The set of current locks. May not be
null
-
getRegisteredSegmentIds
Description copied from interface:IAsyncProcessingPipelineSegmentGroupGets an ordered list of registered segment ids for this group.- Specified by:
getRegisteredSegmentIdsin interfaceIAsyncProcessingPipelineSegmentGroup- Returns:
- The list of segment ids for async. DD pipeline segments belonging to this group.
-
getRunningExclusiveOperationType
Description copied from interface:IAsyncProcessingPipelineSegmentGroupGets the type of the exclusive operation being run in the current group- Specified by:
getRunningExclusiveOperationTypein interfaceIAsyncProcessingPipelineSegmentGroup- Returns:
- The running exclusive operation type, if any.
nullotherwise
-
getSegment
Description copied from interface:IAsyncProcessingPipelineSegmentGroupGets the pipeline segment from the group- Specified by:
getSegmentin interfaceIAsyncProcessingPipelineSegmentGroup- Parameters:
segmentId- The identifier of the segment- Returns:
- The segment, if presents. Could be
null
-
hasAvaiableTasks
Description copied from interface:IAsyncProcessingPipelineSegmentGroupChecks 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).- Specified by:
hasAvaiableTasksin interfaceIAsyncProcessingPipelineSegmentGroup- Returns:
- True if the next task is available; false otherwise.
-
hasPriorityTasks
public boolean hasPriorityTasks()Checks if this group has priority tasks to compute- Specified by:
hasPriorityTasksin interfaceIAsyncProcessingPipelineSegmentGroup- Returns:
- True if the group has priority tasks to compute
-
hasScheduledContexts
public boolean hasScheduledContexts()Checks if the given group has any scheduled contexts,- Specified by:
hasScheduledContextsin interfaceIAsyncProcessingPipelineSegmentGroup- Returns:
- True if any of group segments contains scheduled tasks; false otherwise.
-
hasUnfinishedBlockingTasks
public boolean hasUnfinishedBlockingTasks()Description copied from interface:IAsyncProcessingPipelineSegmentGroupChecks if the current group has active tasks being run at the moment.- Specified by:
hasUnfinishedBlockingTasksin interfaceIAsyncProcessingPipelineSegmentGroup- Returns:
- True in case if there are unfinished tasks belonging to this group being computed by DD subsystem.
-
hasRunningImportantTasks
public boolean hasRunningImportantTasks()Description copied from interface:IAsyncProcessingPipelineSegmentGroupChecks if this group has any of important tasks being run at the moment- Specified by:
hasRunningImportantTasksin interfaceIAsyncProcessingPipelineSegmentGroup- Returns:
- True if the group has any of important tasks being run at the moment
-
increasePriority
Description copied from interface:IAsyncProcessingPipelineSegmentGroupIncrease the priority of the segment.- Specified by:
increasePriorityin interfaceIAsyncProcessingPipelineSegmentGroup- Parameters:
segmentId- The DD segement to increase the priority for. Cannot benull
-
increasePriority
Description copied from interface:IAsyncProcessingPipelineSegmentGroupIncreases priority of a specific object DD segment. Allows async. DD facility to compute this DD segment as soon as possible.- Specified by:
increasePriorityin interfaceIAsyncProcessingPipelineSegmentGroup- Parameters:
segmentId- The identifier of the DD segment.objectId- The identifier of the object.
-
remove
Description copied from interface:IAsyncProcessingPipelineSegmentGroupRemoves object from all segments of this group (if any).- Specified by:
removein interfaceIAsyncProcessingPipelineSegmentGroup
-
remove
Description copied from interface:IAsyncProcessingPipelineSegmentGroupRemoves object from a specified segment of this group (if any).- Specified by:
removein interfaceIAsyncProcessingPipelineSegmentGroup- Parameters:
segmentId- The target DD segment identifier. May not benull
-
deactivateContexts
Description copied from interface:IAsyncProcessingPipelineSegmentGroupDeactivates scheduled contexts in the pipeline group for a specified segment- Specified by:
deactivateContextsin interfaceIAsyncProcessingPipelineSegmentGroup- Parameters:
segmentId- The segment to deactivate scheduled contexts for. Cannot benull
-
schedule
Description copied from interface:IAsyncProcessingPipelineSegmentGroupSchedules the context into the group.- Specified by:
schedulein interfaceIAsyncProcessingPipelineSegmentGroup- Parameters:
segmentId- The target DD segment identifier. May not benullobjectId- The target object identifier. Must be eitherLongorString. May not benull
-
scheduleOperation
Description copied from interface:IAsyncProcessingPipelineSegmentGroupSchedules the orchestrated operation- Specified by:
scheduleOperationin interfaceIAsyncProcessingPipelineSegmentGroup- Parameters:
operationContext- The context of the operation to schedule. May not benull
-
unlockTask
Description copied from interface:IAsyncProcessingPipelineSegmentGroupUnocks the task allowing the DD to compute it- Specified by:
unlockTaskin interfaceIAsyncProcessingPipelineSegmentGroup
-
getModalOperationContext
Description copied from interface:IAsyncProcessingPipelineSegmentGroupGets the active modal operation context in this group if any- Specified by:
getModalOperationContextin interfaceIAsyncProcessingPipelineSegmentGroup- Returns:
- The active modal operation context if any.
nullotherwise
-
merge
Description copied from interface:IAsyncProcessingPipelineSegmentGroupMerges the modal operation group back to the main pipeline group- Specified by:
mergein interfaceIAsyncProcessingPipelineSegmentGroup- Parameters:
externalGroup- The modal pipeline group to merge. May not benull
-
clear
public void clear()Description copied from interface:IAsyncProcessingPipelineSegmentGroupClears the group completelly- Specified by:
clearin interfaceIAsyncProcessingPipelineSegmentGroup
-
getStage
Description copied from interface:IAsyncProcessingPipelineSegmentGroupGets a DD pipeline stage this group is belongs to- Specified by:
getStagein interfaceIAsyncProcessingPipelineSegmentGroup- Returns:
- The DD pipeline stage of the group. May not be
null
-