Interface IAsyncProcessingPipelineSegment
- All Known Implementing Classes:
AbstractAsyncProcessingPipelineSegment,AsyncProcessingPipelineSegment,OperationPipelineSegment
public interface IAsyncProcessingPipelineSegment
Internal segment representation of the async pipeline state
-
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.Gets the multithreading computation policy for this segment.getNextAvailableTaskInfo(Map<Object, String> taskLocks, Collection<AllowedComputations> allowedComputations) Gets the next available task information from this segment, in case of available.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.booleanChecks if this segment has remaining work units being scheduled.booleanChecks if the whole pipeline segment is computed at the moment.booleanChecks if this segment of the pipeline has a long-running computation time (so the system cannot determine the right progress for it).voidmerge(IAsyncProcessingPipelineSegment externalSegment) Merges the segment with external one.voidRemoves the element from the pipeline.Renders status text of the segment.voidSchedules new object DD computation for this pipeline segment.voidPerforms structural check of a segment data on close to find integrity problems.
-
Method Details
-
confirm
Confirms the computation finishing for the given object context.- Parameters:
bmObjectId- The object context identifier.- Returns:
- The result of confirmation. True if the confirmed task was registered in this segment
-
gather
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.
-
getMultiThreadingComputePolicy
MultithreadingComputationPolicy getMultiThreadingComputePolicy()Gets the multithreading computation policy for this segment.- Returns:
- The policy associated with the segment.
-
getNextAvailableTaskInfo
Pair<String,Object> getNextAvailableTaskInfo(Map<Object, String> taskLocks, Collection<AllowedComputations> allowedComputations) 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:
taskLocks- Current task locks. May not benullallowedOperations- The set of allowed operations for this segment. May not benull- Returns:
- The task, if available. May be
null
-
getRemainingUnitsOfWork
int getRemainingUnitsOfWork()Gets the number of remaining work units for this pipeline segment.- Returns:
- Number of units remaining for processing.
-
getSegmentId
String getSegmentId()Gets the associated DD segment identifier.- Returns:
- The DD segment identifier.
-
getSegmentName
String getSegmentName()Gets the display name of the segment.- Returns:
- The name of the segment.
-
getTotalUnitsOfWork
int getTotalUnitsOfWork()Gets known units of work for this segment.- Returns:
- The number of units registered for this segment during the current phase of processing.
-
hasScheduledContexts
boolean hasScheduledContexts()Checks if this segment has remaining work units being scheduled.- Returns:
- True if this segment has remaining work units.
-
isComputed
boolean isComputed()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.
-
isLongRunningSegment
boolean isLongRunningSegment()Checks if this segment of the pipeline has a long-running computation time (so the system cannot determine the right progress for it).- Returns:
- True if this segment is long-running one; false otherwise.
-
renderStatusText
String renderStatusText()Renders status text of the segment.- Returns:
- The displayable status of the segment.
-
schedule
Schedules new object DD computation for this pipeline segment.- Parameters:
object- The object identifier to schedule DD computation for.
-
remove
Removes the element from the pipeline. Removal affects known work units and current processing progress.- Parameters:
bmObjectId- The object identifier to remove the context from the pipeline.
-
clear
void clear()Clears the data in the segment -
merge
Merges the segment with external one. This operation is used during the integraiton of modal operation's results into the main pipeline- Parameters:
segment- The external segment to merge. May not benull
-
validateOnClose
void validateOnClose()Performs structural check of a segment data on close to find integrity problems. Integrity problems are indicated by validation exceptions
-