com.supermap.services.components

Interface JobRunner

  • All Known Implementing Classes:
    CloudJobRunner, DefaultJobRunner


    public interface JobRunner
    

    Tiling task container for running a distributed tiling task.

    • Method Detail

      • getJobConfig

        JobBuildConfig getJobConfig()
        

        Gets task configuration information.

        Returns:
        Since:
        8.1.1
      • start

        void start()
        

        Starts the task.

        Since:
        8.1.1
      • stop

        void stop()
        

        Stops the task.

        Since:
        8.1.1
      • addWorkers

        void addWorkers(java.util.List<TileWorkerClient> workers)
        

        Adds the tiling node.

        Parameters:
        workers -
        Since:
        8.1.1
      • getState

        JobState getState()
        
        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.
        Returns:
      • getTilesetDesc

        TilesetDesc getTilesetDesc()
        
        Get the target information for the task.
        Returns:
      • setTileCountPerTask

        void setTileCountPerTask(long value)
        

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

        Parameters:
        value - The number of tiles.
      • notifyJobDeployCompleted

        void notifyJobDeployCompleted(java.lang.String workerId)
        

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

        Parameters:
        jobId -
        workerId -
        Since:
        7.1.1
      • notifyTaskCompleted

        void notifyTaskCompleted(java.lang.String taskId,
                               java.lang.String workerId)
        

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

        Parameters:
        taskId - The completed Unit tiling task ID.
        workerId - TaskId unit tiling task where the worker exists.
      • notifyTaskFailed

        void notifyTaskFailed(java.lang.String taskId,
                            java.lang.String workerId)
        

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

        Parameters:
        taskId -
        workerId -
        Since:
        8.1.1
      • notifyWorkerDisconnected

        void notifyWorkerDisconnected(java.lang.String workerId)
        

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

        Parameters:
        workerId -
        Since:
        8.1.1
      • addListener

        void addListener(JobRunnerListener listener)
        

        Add listener.

        Parameters:
        listener -
        Since:
        8.1.1
      • notifyTaskCompleted

        void notifyTaskCompleted(java.lang.String taskId,
                               java.lang.String workerId,
                               TileTaskBuildResult result)
        

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

        Parameters:
        taskId -
        workerId -
        result -
        Since:
        8.1.1
      • deployJobToWorker

        void deployJobToWorker(TileWorkerClient client)
        

        Assigns a tiling task to a child node.

        Parameters:
        client -
        Since:
        8.1.1
      • updateTileJob

        void updateTileJob(Tile[] tiles)
        

        Updates the tiling task.

        Parameters:
        tiles -
        Since:
        8.1.1
      • getBlankTileInfos

        BlankTileInfo getBlankTileInfos(double scale,
                                      int fromIndex,
                                      int toIndex)
        

        Gets the white map information.

        Parameters:
        scale -
        fromIndex -
        toIndex -
        Returns:
        Since:
        8.1.1
      • confirmBlankRegionInfos

        void confirmBlankRegionInfos(java.lang.String id)
        

        Confirms the white map range.

        Parameters:
        id -
        Since:
        8.1.1
      • updateBlankRegions

        void updateBlankRegions(double scale,
                              java.lang.String[] invalidRegionIds,
                              java.lang.String[] validRegionIds,
                              java.lang.String[] noneMarkedRegionIds,
                              boolean markAllInvalid,
                              boolean markAllValid)
        

        Updates the white map range.

        Parameters:
        scale -
        invalidRegionIds -
        validRegionIds -
        noneMarkedRegionIds -
        markAllInvalid -
        markAllValid -
        Since:
        8.1.1
      • setTileRegionManager

        void setTileRegionManager(TileRegionStateManager tileRegionStateManager)
        

        Set the Tile Area Manager.

        Parameters:
        tileRegionStateManager -
        Since:
        8.1.1