com.supermap.services.components.impl

Class DefaultJobRunner

  • java.lang.Object
    • com.supermap.services.components.impl.DefaultJobRunner
    • Constructor Detail

      • DefaultJobRunner

        public DefaultJobRunner()
        
    • Method Detail

      • start

        public void start()
        
        Description copied from interface: JobRunner

        Starts the task.

        Specified by:
        start in interface JobRunner
      • addWorker

        public void addWorker(TileWorkerClient worker)
        

        Adds the tiling node.

        Parameters:
        worker -
        Since:
        8.1.1
      • stop

        public void stop()
        
        Description copied from interface: JobRunner

        Stops the task.

        Specified by:
        stop in interface JobRunner
      • getState

        public JobState getState()
        
        Description copied from interface: JobRunner
        Gets Job status. The status returned is not real-time, but it is valid. During the execution of the Job, the status of the Job may be modified concurrently. When this method is called, if another thread is modifying the state of the job, that is, modifying the JobState object's field, the method does not synchronize with the modified thread, so the state it returns is not real-time. But the status of the return is certainly a state after the completion of a modification, rather than the state of the concurrent modification (the state in the modification may be invalid), so the returned state is valid.
        Specified by:
        getState in interface JobRunner
        Returns:
      • getTilesetDesc

        public TilesetDesc getTilesetDesc()
        
        Description copied from interface: JobRunner
        Get the target information for the task.
        Specified by:
        getTilesetDesc in interface JobRunner
        Returns:
      • setTileCountPerTask

        public void setTileCountPerTask(long value)
        
        Description copied from interface: JobRunner

        Sets the number of tiles assigned to each unit's tiling task. For a unit tiling task, see TileTask.

        Specified by:
        setTileCountPerTask in interface JobRunner
        Parameters:
        value - The number of tiles.
      • notifyJobDeployCompleted

        public void notifyJobDeployCompleted(java.lang.String workerId)
        
        Description copied from interface: JobRunner

        Notifies the tiling master node, and the tiling job is deployed successfully at the tiling node

        Specified by:
        notifyJobDeployCompleted in interface JobRunner
      • notifyTaskCompleted

        public void notifyTaskCompleted(java.lang.String taskId,
                               java.lang.String workerId)
        
        Description copied from interface: JobRunner

        Notifies the tiling master node that a unit tiling task completed.

        Specified by:
        notifyTaskCompleted in interface JobRunner
        Parameters:
        taskId - The completed Unit tiling task ID.
        workerId - TaskId unit tiling task where the worker exists.
      • notifyTaskCompleted

        public void notifyTaskCompleted(java.lang.String taskId,
                               java.lang.String workerId,
                               TileTaskBuildResult result)
        
        Description copied from interface: JobRunner

        Notifies the tiling master node that a unit tiling task completed.

        Specified by:
        notifyTaskCompleted in interface JobRunner
      • notifyTaskFailed

        public void notifyTaskFailed(java.lang.String taskid,
                            java.lang.String workerId)
        
        Description copied from interface: JobRunner

        Notifies the tiling master node that a unit tiling task failed.

        Specified by:
        notifyTaskFailed in interface JobRunner
      • notifyWorkerDisconnected

        public void notifyWorkerDisconnected(java.lang.String workerId)
        
        Description copied from interface: JobRunner

        Notifies the tiling master node that a child node connection failed.

        Specified by:
        notifyWorkerDisconnected in interface JobRunner
      • getRemoteWorkspacePath

        public java.lang.String getRemoteWorkspacePath(JobBuildConfig jobBuildConfig)
        

        Gets the child node workspace path.

        Parameters:
        jobBuildConfig -
        Returns:
        Since:
        8.1.1
      • dispose

        public void dispose()
        
        Description copied from interface: Disposable

        Release the resource object.

        Specified by:
        dispose in interface Disposable
      • updateTileJob

        public void updateTileJob(Tile[] tiles)
        
        Description copied from interface: JobRunner

        Updates the tiling task.

        Specified by:
        updateTileJob in interface JobRunner
      • getBlankTileInfos

        public BlankTileInfo getBlankTileInfos(double scale,
                                      int fromIndex,
                                      int toIndex)
        
        Description copied from interface: JobRunner

        Gets the white map information.

        Specified by:
        getBlankTileInfos in interface JobRunner
        Returns:
      • confirmBlankRegionInfos

        public void confirmBlankRegionInfos(java.lang.String jobId)
        
        Description copied from interface: JobRunner

        Confirms the white map range.

        Specified by:
        confirmBlankRegionInfos in interface JobRunner
      • updateBlankRegions

        public void updateBlankRegions(double scale,
                              java.lang.String[] invalidRegionIds,
                              java.lang.String[] validRegionIds,
                              java.lang.String[] noneMarkedRegionIds,
                              boolean markAllInvalid,
                              boolean markAllValid)
        
        Description copied from interface: JobRunner

        Updates the white map range.

        Specified by:
        updateBlankRegions in interface JobRunner
      • setDeployTaskThreadCount

        public void setDeployTaskThreadCount(int deployTaskThreadCount)