Class OperationPipelineSegmentGroup
java.lang.Object
com._1c.g5.v8.internal.derived.pipeline.OperationPipelineSegmentGroup
- All Implemented Interfaces:
IAsyncProcessingPipelineSegmentGroup
public class OperationPipelineSegmentGroup
extends Object
implements IAsyncProcessingPipelineSegmentGroup
The operation-specific implementation of the
IAsyncProcessingPipelineSegmentGroup
-
Constructor Summary
ConstructorsConstructorDescriptionOperationPipelineSegmentGroup
(IAsyncProcessingPipelineSegment segment, DerivedDataSegmentBucket stage) Creates an instance of the DD async. pipeline segment group. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears the group completellyboolean
confirmTaskCompletion
(Object objectId) Confirms completion of a task from the current group.void
deactivateContexts
(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 toboolean
hasAvaiableTasks
(Collection<AllowedComputations> allowedComputations) Checks if the group has available tasks.boolean
Checks if this group has priority tasks to computeboolean
Checks if this group has any of important tasks being run at the momentboolean
Checks if the given group has any scheduled contexts,boolean
Checks if the current group has active tasks being run at the moment.void
increasePriority
(String segmentId) Increase the priority of the segment.void
increasePriority
(String segmentId, Object objectId) Increases priority of a specific object DD segment.void
Merges the modal operation group back to the main pipeline groupvoid
Removes object from all segments of this group (if any).void
Schedules the context into the group.void
scheduleOperation
(OperationContext operationContext) Schedules the orchestrated operationvoid
unlockTask
(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, wait
Methods inherited from interface com._1c.g5.v8.internal.derived.pipeline.IAsyncProcessingPipelineSegmentGroup
remove
-
Constructor Details
-
OperationPipelineSegmentGroup
public OperationPipelineSegmentGroup(IAsyncProcessingPipelineSegment segment, DerivedDataSegmentBucket stage) Creates an instance of the DD async. pipeline segment group. Contains only one segment.- Parameters:
segment
- The target operation segment. May not benull
stage
- The target pipeline stage. May not benull
-
-
Method Details
-
confirmTaskCompletion
Description copied from interface:IAsyncProcessingPipelineSegmentGroup
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.- Specified by:
confirmTaskCompletion
in 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) Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Gathers next available task.- Specified by:
gatherNextAvailableTask
in interfaceIAsyncProcessingPipelineSegmentGroup
- Returns:
- The next available task if any.
-
getGroupMultiThreadingComputePolicy
Description copied from interface:IAsyncProcessingPipelineSegmentGroup
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:
getGroupMultiThreadingComputePolicy
in interfaceIAsyncProcessingPipelineSegmentGroup
- Returns:
- The combined multithreading computation policy of the group.
-
getLocks
Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Gets the set of current locks in the pipeline- Specified by:
getLocks
in interfaceIAsyncProcessingPipelineSegmentGroup
- Returns:
- The set of current locks. May not be
null
-
getRegisteredSegmentIds
Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Gets an ordered list of registered segment ids for this group.- Specified by:
getRegisteredSegmentIds
in interfaceIAsyncProcessingPipelineSegmentGroup
- Returns:
- The list of segment ids for async. DD pipeline segments belonging to this group.
-
getRunningExclusiveOperationType
Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Gets the type of the exclusive operation being run in the current group- Specified by:
getRunningExclusiveOperationType
in interfaceIAsyncProcessingPipelineSegmentGroup
- Returns:
- The running exclusive operation type, if any.
null
otherwise
-
getRunningExclusiveTasks
Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Gets running exclusive tasks if any- Specified by:
getRunningExclusiveTasks
in interfaceIAsyncProcessingPipelineSegmentGroup
- Returns:
- The map of running exclusive tasks, never
null
-
getRunningHalfExclusiveTasks
Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Gets the set of running half-exclusive tasks- Specified by:
getRunningHalfExclusiveTasks
in interfaceIAsyncProcessingPipelineSegmentGroup
- Returns:
- The set of tasks, never
null
-
getSegment
Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Gets the pipeline segment from the group- Specified by:
getSegment
in interfaceIAsyncProcessingPipelineSegmentGroup
- Parameters:
segmentId
- The identifier of the segment- Returns:
- The segment, if presents. Could be
null
-
hasAvaiableTasks
Description copied from interface:IAsyncProcessingPipelineSegmentGroup
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).- Specified by:
hasAvaiableTasks
in interfaceIAsyncProcessingPipelineSegmentGroup
- Returns:
- True if the next task is available; false otherwise.
-
hasPriorityTasks
public boolean hasPriorityTasks()Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Checks if this group has priority tasks to compute- Specified by:
hasPriorityTasks
in interfaceIAsyncProcessingPipelineSegmentGroup
- Returns:
- True if the group has priority tasks to compute
-
hasScheduledContexts
public boolean hasScheduledContexts()Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Checks if the given group has any scheduled contexts,- Specified by:
hasScheduledContexts
in interfaceIAsyncProcessingPipelineSegmentGroup
- Returns:
- True if any of group segments contains scheduled tasks; false otherwise.
-
hasUnfinishedBlockingTasks
public boolean hasUnfinishedBlockingTasks()Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Checks if the current group has active tasks being run at the moment.- Specified by:
hasUnfinishedBlockingTasks
in 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:IAsyncProcessingPipelineSegmentGroup
Checks if this group has any of important tasks being run at the moment- Specified by:
hasRunningImportantTasks
in interfaceIAsyncProcessingPipelineSegmentGroup
- Returns:
- True if the group has any of important tasks being run at the moment
-
increasePriority
Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Increase the priority of the segment.- Specified by:
increasePriority
in interfaceIAsyncProcessingPipelineSegmentGroup
- Parameters:
segmentId
- The DD segement to increase the priority for. Cannot benull
-
increasePriority
Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Increases priority of a specific object DD segment. Allows async. DD facility to compute this DD segment as soon as possible.- Specified by:
increasePriority
in interfaceIAsyncProcessingPipelineSegmentGroup
- Parameters:
segmentId
- The identifier of the DD segment.objectId
- The identifier of the object.
-
remove
Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Removes object from all segments of this group (if any).- Specified by:
remove
in interfaceIAsyncProcessingPipelineSegmentGroup
-
schedule
Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Schedules the context into the group.- Specified by:
schedule
in interfaceIAsyncProcessingPipelineSegmentGroup
- Parameters:
segmentId
- The target DD segment identifier. May not benull
objectId
- The target object identifier. Must be eitherLong
orString
. May not benull
-
deactivateContexts
Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Deactivates scheduled contexts in the pipeline group for a specified segment- Specified by:
deactivateContexts
in interfaceIAsyncProcessingPipelineSegmentGroup
- Parameters:
segmentId
- The segment to deactivate scheduled contexts for. Cannot benull
-
scheduleOperation
Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Schedules the orchestrated operation- Specified by:
scheduleOperation
in interfaceIAsyncProcessingPipelineSegmentGroup
- Parameters:
operationContext
- The context of the operation to schedule. May not benull
-
unlockTask
Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Unocks the task allowing the DD to compute it- Specified by:
unlockTask
in interfaceIAsyncProcessingPipelineSegmentGroup
-
getModalOperationContext
Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Gets the active modal operation context in this group if any- Specified by:
getModalOperationContext
in interfaceIAsyncProcessingPipelineSegmentGroup
- Returns:
- The active modal operation context if any.
null
otherwise
-
merge
Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Merges the modal operation group back to the main pipeline group- Specified by:
merge
in interfaceIAsyncProcessingPipelineSegmentGroup
- Parameters:
group
- The modal pipeline group to merge. May not benull
-
clear
public void clear()Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Clears the group completelly- Specified by:
clear
in interfaceIAsyncProcessingPipelineSegmentGroup
-
getStage
Description copied from interface:IAsyncProcessingPipelineSegmentGroup
Gets a DD pipeline stage this group is belongs to- Specified by:
getStage
in interfaceIAsyncProcessingPipelineSegmentGroup
- Returns:
- The DD pipeline stage of the group. May not be
null
-