Class AbstractAsyncProcessingPipelineSegment
java.lang.Object
com._1c.g5.v8.internal.derived.pipeline.AbstractAsyncProcessingPipelineSegment
- All Implemented Interfaces:
IAsyncProcessingPipelineSegment
- Direct Known Subclasses:
AsyncProcessingPipelineSegment,OperationPipelineSegment
public abstract class AbstractAsyncProcessingPipelineSegment
extends Object
implements IAsyncProcessingPipelineSegment
Common abstract implementation of the
IAsyncProcessingPipelineSegment-
Constructor Summary
ConstructorsConstructorDescriptionAbstractAsyncProcessingPipelineSegment(String segmentId, String segmentName, String statusTextPattern, MultithreadingComputationPolicy multithreadingComputationPolicy, boolean longRunningSegment) Constructs an instance of a async pipeline segment state holder -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDecrements total units of work in this segmentGets the multithreading computation policy for this segment.intGets the number of remaining work units for this pipeline segment.Gets the associated DD segment identifier.Gets the display name of the segment.intGets known units of work for this segment.protected voidIncrements total units of work in this segmentbooleanChecks if this segment of the pipeline has a long-running computation time (so the system cannot determine the right progress for it).Renders status text of the segment.protected voidsetRemainingUnitsOfWork(int remainingUnitsOfWork) Sets the number of remaining units of work for this segmentprotected voidsetTotalUnitsOfWork(int totalUnitsOfWork) Sets the total number of units of work for this segmentMethods 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.IAsyncProcessingPipelineSegment
clear, confirm, gather, getNextAvailableTaskInfo, hasScheduledContexts, isComputed, merge, remove, schedule, validateOnClose
-
Constructor Details
-
AbstractAsyncProcessingPipelineSegment
public AbstractAsyncProcessingPipelineSegment(String segmentId, String segmentName, String statusTextPattern, MultithreadingComputationPolicy multithreadingComputationPolicy, boolean longRunningSegment) Constructs an instance of a async pipeline segment state holder- Parameters:
segmentId- The identifier of a segment. May not benullsegmentName- The name of a segment. May not benullstatusTextPattern- The status pattern of a segment. May not benullmultithreadingComputationPolicy- The multi-threading computation policy. May not benulllongRunningSegment- The flag of a long-running segment (without exact units of work)
-
-
Method Details
-
getMultiThreadingComputePolicy
Description copied from interface:IAsyncProcessingPipelineSegmentGets the multithreading computation policy for this segment.- Specified by:
getMultiThreadingComputePolicyin interfaceIAsyncProcessingPipelineSegment- Returns:
- The policy associated with the segment.
-
getRemainingUnitsOfWork
public int getRemainingUnitsOfWork()Description copied from interface:IAsyncProcessingPipelineSegmentGets the number of remaining work units for this pipeline segment.- Specified by:
getRemainingUnitsOfWorkin interfaceIAsyncProcessingPipelineSegment- Returns:
- Number of units remaining for processing.
-
getSegmentId
Description copied from interface:IAsyncProcessingPipelineSegmentGets the associated DD segment identifier.- Specified by:
getSegmentIdin interfaceIAsyncProcessingPipelineSegment- Returns:
- The DD segment identifier.
-
getSegmentName
Description copied from interface:IAsyncProcessingPipelineSegmentGets the display name of the segment.- Specified by:
getSegmentNamein interfaceIAsyncProcessingPipelineSegment- Returns:
- The name of the segment.
-
getTotalUnitsOfWork
public int getTotalUnitsOfWork()Description copied from interface:IAsyncProcessingPipelineSegmentGets known units of work for this segment.- Specified by:
getTotalUnitsOfWorkin interfaceIAsyncProcessingPipelineSegment- Returns:
- The number of units registered for this segment during the current phase of processing.
-
isLongRunningSegment
public boolean isLongRunningSegment()Description copied from interface:IAsyncProcessingPipelineSegmentChecks if this segment of the pipeline has a long-running computation time (so the system cannot determine the right progress for it).- Specified by:
isLongRunningSegmentin interfaceIAsyncProcessingPipelineSegment- Returns:
- True if this segment is long-running one; false otherwise.
-
renderStatusText
Description copied from interface:IAsyncProcessingPipelineSegmentRenders status text of the segment.- Specified by:
renderStatusTextin interfaceIAsyncProcessingPipelineSegment- Returns:
- The displayable status of the segment.
-
decrementTotalUnitsOfWork
protected void decrementTotalUnitsOfWork()Decrements total units of work in this segment -
incrementTotalUnitsOfWork
protected void incrementTotalUnitsOfWork()Increments total units of work in this segment -
setRemainingUnitsOfWork
protected void setRemainingUnitsOfWork(int remainingUnitsOfWork) Sets the number of remaining units of work for this segment- Parameters:
remainingUnitsOfWork- The number to set
-
setTotalUnitsOfWork
protected void setTotalUnitsOfWork(int totalUnitsOfWork) Sets the total number of units of work for this segment- Parameters:
totalUnitsOfWork- The number to set
-