com.supermap.services.components

Class AbstractRuntimeJobState

  • Direct Known Subclasses:
    CloudRuntimeJobState


    public abstract class AbstractRuntimeJobState
    extends JobState
    

    Runtime tiling job state info class. Responsibilities include
    1, Split of tiling task 2, when tiling sub-node task completed or failed, the tiling state is automatically updated
    3, Sub-node state management etc.

    Since:
    6.1.3
    • Constructor Detail

      • AbstractRuntimeJobState

        public AbstractRuntimeJobState(JobState value)
        

        The Constructor.

        Parameters:
        value -
    • Method Detail

      • getInfoByScale

        protected TileScaleInfo getInfoByScale(double scaleDenominator)
        

        Gets the progress of the tiling task progress.

        Parameters:
        scaleDenominator -
        Returns:
      • getState

        public JobState getState()
        

        Gets all current task status.

        Returns:
      • getTaskById

        public TileTask getTaskById(java.lang.String id)
        

        Gets the unit task throuth ID.

        Parameters:
        id -
        Returns:
      • updateTaskToCompleted

        public abstract JobState updateTaskToCompleted(TileTask task,
                                     TileTaskBuildResult taskBuildResult,
                                     TileWorkerInfo tileWorkerInfo)
        

        Updates the current state to reflect the task has been completed.

        Parameters:
        task -
        Returns:
        Since:
        6.1.3
      • updateTaskToCompleted

        public abstract JobState updateTaskToCompleted(TileTask task)
        

        Updates the current state to reflect the task has been completed.

        Parameters:
        task -
        Returns:
        Since:
        6.1.3
      • updatElapsedTime

        protected void updatElapsedTime(JobState result)
        
      • delTask

        protected void delTask(java.lang.String id)
        
      • getTask

        public abstract TileTask getTask()
        

        Gets unit tasks.

        Parameters:
        id -
        Returns:
      • getScaleBuildConfigByScale

        protected ScaleBuildConfig getScaleBuildConfigByScale(double scaleDenominator)
        
      • setConfig

        public void setConfig(JobBuildConfig value)
        

        Sets the tiling task configuration information.

        Parameters:
        value -
      • updateTaskFailed

        public JobState updateTaskFailed(TileTask task)
        

        Mark the unit tiling task as failed.

        Parameters:
        task -
        Returns:
      • stop

        public JobState stop()
        

        Stop the tiling task.

        Returns:
      • start

        public JobState start()
        

        Start the tiling task.

        Returns:
      • notifyWorkerDisconnected

        public JobState notifyWorkerDisconnected(java.lang.String workerId)
        

        When the spliting node connection fails, mark the unit tiling task as failed.

        Parameters:
        workerId -
        Returns:
      • getAllTasks

        public java.util.List<TileTask> getAllTasks()
        

        Gets the list of the unit tiling tasks.

        Returns:
      • updateProgress

        public void updateProgress(java.util.Map<java.lang.String,java.lang.Long> progress)
        

        Updates the tiling progress.

        Parameters:
        progress -
      • notifyLostConnectionPerhaps

        public java.util.List<java.lang.String> notifyLostConnectionPerhaps(java.util.Map<java.lang.String,TileTask> lostConnection)
        

        Gets the disconnected workID when the unit tiling task is working.

        Parameters:
        lostConnection -
        Returns:
      • addUpdateTasks

        public JobState addUpdateTasks(TileTask[] updateTasks)
        

        Adds Unit tiling Task.

        Parameters:
        updateTasks -
        Returns:
      • setTileRegionStateManager

        public void setTileRegionStateManager(TileRegionStateManager tileRegionStateManager)
        

        Sets the tile Region State Manager.

        Parameters:
        tileRegionStateManager -