Class OperationPipelineSegment
java.lang.Object
com._1c.g5.v8.internal.derived.pipeline.AbstractAsyncProcessingPipelineSegment
com._1c.g5.v8.internal.derived.pipeline.OperationPipelineSegment
- All Implemented Interfaces:
IAsyncProcessingPipelineSegment
Segment data holder for the orchestrated operation stage of the
AsyncProcessingPipeline
-
Constructor Summary
ConstructorsConstructorDescriptionOperationPipelineSegment
(String segmentId, MultithreadingComputationPolicy multithreadingComputationPolicy, String segmentName, String statusTextPattern) Creates an instance of the pipeline segment. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears the data in the segmentboolean
Confirms the computation finishing for the given object context.void
Gathers the context from the segment for the computation.getNextAvailableTaskInfo
(Map<Object, String> activeLockingTasks, Collection<AllowedComputations> allowedComputations) Gets the next available task information from this segment, in case of available.boolean
hasOperation
(OperationContext context) Checks if the segment has an operation as a scheduled item or as a computed itemboolean
Checks if this segment has remaining work units being scheduled.boolean
Checks if the whole pipeline segment is computed at the moment.void
merge
(IAsyncProcessingPipelineSegment externalSegment) Merges the segment with external one.void
Removes the element from the pipeline.void
Schedules new object DD computation for this pipeline segment.void
Performs structural check of a segment data on close to find integrity problems.Methods inherited from class com._1c.g5.v8.internal.derived.pipeline.AbstractAsyncProcessingPipelineSegment
decrementTotalUnitsOfWork, getMultiThreadingComputePolicy, getRemainingUnitsOfWork, getSegmentId, getSegmentName, getTotalUnitsOfWork, incrementTotalUnitsOfWork, isLongRunningSegment, renderStatusText, setRemainingUnitsOfWork, setTotalUnitsOfWork
-
Constructor Details
-
OperationPipelineSegment
public OperationPipelineSegment(String segmentId, MultithreadingComputationPolicy multithreadingComputationPolicy, String segmentName, String statusTextPattern) Creates an instance of the pipeline segment.- Parameters:
segmentId
- The identifier of DD segment for this pipeline segment.multithreadingComputationPolicy
- The multi-thread computation policy. May not benull
segmentName
- The human-readable name of the segment. May not benull
statusTextPattern
- The progress status text pattern. May not benull
-
-
Method Details
-
confirm
Description copied from interface:IAsyncProcessingPipelineSegment
Confirms the computation finishing for the given object context.- Returns:
- The result of confirmation. True if the confirmed task was registered in this segment
-
gather
Description copied from interface:IAsyncProcessingPipelineSegment
Gathers the context from the segment for the computation. Gathering affects doesn't affect the total/remaining number of work units. The remaining units of works are updated on computation confirmation step.- Parameters:
objectId
- The identifier of the object which context should be gathered from the pipeline segment.
-
getNextAvailableTaskInfo
public Pair<String,Object> getNextAvailableTaskInfo(Map<Object, String> activeLockingTasks, Collection<AllowedComputations> allowedComputations) Description copied from interface:IAsyncProcessingPipelineSegment
Gets the next available task information from this segment, in case of available. Takes currently locked tasks into the account. Doesn't change the state of the pipeline segment- Parameters:
activeLockingTasks
- Current task locks. May not benull
- Returns:
- The task, if available. May be
null
-
hasOperation
Checks if the segment has an operation as a scheduled item or as a computed item- Parameters:
context
- The target operation context. May not benull
- Returns:
- True if the segment contains the operation
-
hasScheduledContexts
public boolean hasScheduledContexts()Description copied from interface:IAsyncProcessingPipelineSegment
Checks if this segment has remaining work units being scheduled.- Returns:
- True if this segment has remaining work units.
-
isComputed
public boolean isComputed()Description copied from interface:IAsyncProcessingPipelineSegment
Checks if the whole pipeline segment is computed at the moment. This means that it has no scheduled and/or processed tasks.- Returns:
- True if the pipeline segment is computed; false otherwise.
-
remove
Description copied from interface:IAsyncProcessingPipelineSegment
Removes the element from the pipeline. Removal affects known work units and current processing progress. -
schedule
Description copied from interface:IAsyncProcessingPipelineSegment
Schedules new object DD computation for this pipeline segment.- Parameters:
object
- The object identifier to schedule DD computation for.
-
clear
public void clear()Description copied from interface:IAsyncProcessingPipelineSegment
Clears the data in the segment -
merge
Description copied from interface:IAsyncProcessingPipelineSegment
Merges the segment with external one. This operation is used during the integraiton of modal operation's results into the main pipeline -
validateOnClose
public void validateOnClose()Description copied from interface:IAsyncProcessingPipelineSegment
Performs structural check of a segment data on close to find integrity problems. Integrity problems are indicated by validation exceptions
-