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 void
Decrements total units of work in this segmentGets the multithreading computation policy for this segment.int
Gets the number of remaining work units for this pipeline segment.Gets the associated DD segment identifier.Gets the display name of the segment.int
Gets known units of work for this segment.protected void
Increments total units of work in this segmentboolean
Checks 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 void
setRemainingUnitsOfWork
(int remainingUnitsOfWork) Sets the number of remaining units of work for this segmentprotected void
setTotalUnitsOfWork
(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, wait
Methods 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 benull
segmentName
- The name of a segment. May not benull
statusTextPattern
- The status pattern of a segment. May not benull
multithreadingComputationPolicy
- The multi-threading computation policy. May not benull
longRunningSegment
- The flag of a long-running segment (without exact units of work)
-
-
Method Details
-
getMultiThreadingComputePolicy
Description copied from interface:IAsyncProcessingPipelineSegment
Gets the multithreading computation policy for this segment.- Specified by:
getMultiThreadingComputePolicy
in interfaceIAsyncProcessingPipelineSegment
- Returns:
- The policy associated with the segment.
-
getRemainingUnitsOfWork
public int getRemainingUnitsOfWork()Description copied from interface:IAsyncProcessingPipelineSegment
Gets the number of remaining work units for this pipeline segment.- Specified by:
getRemainingUnitsOfWork
in interfaceIAsyncProcessingPipelineSegment
- Returns:
- Number of units remaining for processing.
-
getSegmentId
Description copied from interface:IAsyncProcessingPipelineSegment
Gets the associated DD segment identifier.- Specified by:
getSegmentId
in interfaceIAsyncProcessingPipelineSegment
- Returns:
- The DD segment identifier.
-
getSegmentName
Description copied from interface:IAsyncProcessingPipelineSegment
Gets the display name of the segment.- Specified by:
getSegmentName
in interfaceIAsyncProcessingPipelineSegment
- Returns:
- The name of the segment.
-
getTotalUnitsOfWork
public int getTotalUnitsOfWork()Description copied from interface:IAsyncProcessingPipelineSegment
Gets known units of work for this segment.- Specified by:
getTotalUnitsOfWork
in interfaceIAsyncProcessingPipelineSegment
- Returns:
- The number of units registered for this segment during the current phase of processing.
-
isLongRunningSegment
public boolean isLongRunningSegment()Description copied from interface:IAsyncProcessingPipelineSegment
Checks if this segment of the pipeline has a long-running computation time (so the system cannot determine the right progress for it).- Specified by:
isLongRunningSegment
in interfaceIAsyncProcessingPipelineSegment
- Returns:
- True if this segment is long-running one; false otherwise.
-
renderStatusText
Description copied from interface:IAsyncProcessingPipelineSegment
Renders status text of the segment.- Specified by:
renderStatusText
in 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
-