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

public class AsyncProcessingPipelineSegment extends AbstractAsyncProcessingPipelineSegment
Segment data holder for the async processing pipeline.
  • 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: IAsyncProcessingPipelineSegment
      Clears the data in the segment
    • 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> taskLocks, 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:
      taskLocks - Current task locks. May not be null
      Returns:
      The task, if available. May be null
    • 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.
    • isScheduled

      public boolean isScheduled(Object objectId)
    • 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
    • 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.
    • 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