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

public class OperationPipelineSegment extends AbstractAsyncProcessingPipelineSegment
Segment data holder for the orchestrated operation stage of the AsyncProcessingPipeline
  • 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 be null
      segmentName - The human-readable name of the segment. May not be null
      statusTextPattern - The progress status text pattern. May not be null
  • Method Details

    • confirm

      public boolean confirm(Object objectId)
      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

      public void gather(Object objectId)
      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 be null
      Returns:
      The task, if available. May be null
    • hasOperation

      public boolean hasOperation(OperationContext context)
      Checks if the segment has an operation as a scheduled item or as a computed item
      Parameters:
      context - The target operation context. May not be null
      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

      public void remove(Object objectId)
      Description copied from interface: IAsyncProcessingPipelineSegment
      Removes the element from the pipeline. Removal affects known work units and current processing progress.
    • schedule

      public void schedule(Object object)
      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

      public void merge(IAsyncProcessingPipelineSegment externalSegment)
      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