Class AsyncProcessingPipelineSegment
java.lang.Object
com._1c.g5.v8.internal.derived.pipeline.AbstractAsyncProcessingPipelineSegment
com._1c.g5.v8.internal.derived.pipeline.AsyncProcessingPipelineSegment
- All Implemented Interfaces:
IAsyncProcessingPipelineSegment
Segment data holder for the async processing pipeline.
-
Constructor Summary
ConstructorsConstructorDescriptionAsyncProcessingPipelineSegment(String segmentId, MultithreadingComputationPolicy multithreadingComputationPolicy, boolean longRunningSegment, String segmentName, String statusTextPattern) Creates an instance of the pipeline segment. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the data in the segmentbooleanConfirms the computation finishing for the given object context.voidGathers the context from the segment for the computation.getNextAvailableTaskInfo(Map<Object, String> taskLocks, Collection<AllowedComputations> allowedComputations) Gets the next available task information from this segment, in case of available.booleanChecks if this segment has remaining work units being scheduled.booleanChecks if the whole pipeline segment is computed at the moment.booleanisScheduled(Object objectId) voidmerge(IAsyncProcessingPipelineSegment externalSegment) Merges the segment with external one.voidRemoves the element from the pipeline.voidSchedules new object DD computation for this pipeline segment.voidPerforms 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
-
AsyncProcessingPipelineSegment
public AsyncProcessingPipelineSegment(String segmentId, MultithreadingComputationPolicy multithreadingComputationPolicy, boolean longRunningSegment, String segmentName, String statusTextPattern) Creates an instance of the pipeline segment.- Parameters:
segmentId- The identifier of DD segment for this pipeline segment.
-
-
Method Details
-
clear
public void clear()Description copied from interface:IAsyncProcessingPipelineSegmentClears the data in the segment -
confirm
Description copied from interface:IAsyncProcessingPipelineSegmentConfirms 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:IAsyncProcessingPipelineSegmentGathers 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> taskLocks, Collection<AllowedComputations> allowedComputations) Description copied from interface:IAsyncProcessingPipelineSegmentGets 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:
taskLocks- Current task locks. May not benull- Returns:
- The task, if available. May be
null
-
hasScheduledContexts
public boolean hasScheduledContexts()Description copied from interface:IAsyncProcessingPipelineSegmentChecks 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:IAsyncProcessingPipelineSegmentChecks 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.
-
isScheduled
-
merge
Description copied from interface:IAsyncProcessingPipelineSegmentMerges the segment with external one. This operation is used during the integraiton of modal operation's results into the main pipeline -
remove
Description copied from interface:IAsyncProcessingPipelineSegmentRemoves the element from the pipeline. Removal affects known work units and current processing progress. -
schedule
Description copied from interface:IAsyncProcessingPipelineSegmentSchedules new object DD computation for this pipeline segment.- Parameters:
object- The object identifier to schedule DD computation for.
-
validateOnClose
public void validateOnClose()Description copied from interface:IAsyncProcessingPipelineSegmentPerforms structural check of a segment data on close to find integrity problems. Integrity problems are indicated by validation exceptions
-