com.supermap.services.components.impl

Class DefaultTileMaster

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

      • DefaultTileMaster

        public DefaultTileMaster()
        

        The Constructor.

    • Method Detail

      • redeployJobToWorker

        public void redeployJobToWorker(java.lang.String jobId,
                               java.lang.String workerId)
        
        Description copied from interface: TileMaster

        When deploying a tiling task to a worker fails, it is used for redeployment.

        Specified by:
        redeployJobToWorker in interface TileMaster
        Parameters:
        jobId - The task id needs to be redeployed.
        workerId - Needs to redeploy the worker's id.
      • setRestContext

        public void setRestContext(RestContext value)
        

        Sets the Rest context information.

        Parameters:
        value -
      • addTileWorker

        public boolean addTileWorker(TileWorkerInfo connInfo)
        

        Adds the tiling node.

        Specified by:
        addTileWorker in interface TileMaster
        Parameters:
        conInfo -
        Returns:
        Since:
        6.1.3
      • removeTileWorker

        public void removeTileWorker(java.lang.String workerId)
        

        Removes the tiling node.

        Specified by:
        removeTileWorker in interface TileMaster
        Parameters:
        workerId -
        Since:
        6.1.3
      • workerQuit

        public void workerQuit(TileWorkerInfo conInfo)
        

        Notifies the tiling master node that the tiling task Has been withdrawn.

        Specified by:
        workerQuit in interface TileMaster
        Parameters:
        conInfo -
        Since:
        6.1.3
      • stopJob

        public void stopJob(java.lang.String jobId)
        

        Stops the tiling job

        Specified by:
        stopJob in interface TileMaster
        Parameters:
        jobId -
        Since:
        6.1.3
      • startJob

        public void startJob(java.lang.String jobId)
        

        Starts the tiling job

        Specified by:
        startJob in interface TileMaster
        Parameters:
        jobId -
        Since:
        6.1.3
      • restart

        public void restart(java.lang.String jobId)
        

        Restarts the tiling job

        Specified by:
        restart in interface TileMaster
        Parameters:
        jobId -
        Since:
        6.1.3
      • addJob

        public TileJob addJob(JobInfo jobInfo)
        

        Creates a tiling job

        Specified by:
        addJob in interface TileMaster
        Parameters:
        l -
        Returns:
        Since:
        6.1.3
      • handleUserDefinedInfo

        public TileSourceInfo handleUserDefinedInfo(TileSourceInfo info)
        

        Gets the tile source information in the TileSource container.

        Parameters:
        l -
        Returns:
      • getTileJobs

        public java.util.List<TileJob> getTileJobs()
        

        Returns all tiling job information

        Specified by:
        getTileJobs in interface TileMaster
        Returns:
        All tiling job information
        Since:
        6.1.3
      • getTileJob

        public TileJob getTileJob(java.lang.String jobID)
        

        Returns a named tiling job information

        Specified by:
        getTileJob in interface TileMaster
        Parameters:
        jobID - Tiling task ID.
        Returns:
        The tiling task information for the specified ID
        Since:
        6.1.3
      • notifyJobDeployCompleted

        public boolean notifyJobDeployCompleted(java.lang.String jobId,
                                       java.lang.String workerId)
        

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

        Specified by:
        notifyJobDeployCompleted in interface TileMaster
        Parameters:
        jobId - Tiling task ID.
        workerId - Tiling node ID.
        Returns:
        Since:
        7.1.1
      • notifyTaskCompleted

        public boolean notifyTaskCompleted(java.lang.String jobId,
                                  java.lang.String taskId,
                                  java.lang.String workerId)
        

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

        Specified by:
        notifyTaskCompleted in interface TileMaster
        Parameters:
        jobId - Tiling task ID.
        taskId - Unit tiling task ID. See TileTask for unit tiling tasks.
        workerId - The TileWorker ID of performing the unit task.
        Returns:
        Whether to complete the notice.
        Since:
        6.1.3
      • notifyTaskFailed

        public boolean notifyTaskFailed(java.lang.String jobId,
                               java.lang.String taskId,
                               java.lang.String workerId)
        

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

        Specified by:
        notifyTaskFailed in interface TileMaster
        Parameters:
        jobId - Tiling task ID.
        taskId - Unit tiling task ID. See TileTask for unit tiling tasks.
        workerId - The TileWorker ID of performing the unit task.
        Returns:
        Whether to complete the notice.
        Since:
        6.1.3
      • deleteJob

        public boolean deleteJob(java.lang.String jobID)
        

        Deletes the tiling task

        Specified by:
        deleteJob in interface TileMaster
        Parameters:
        jobID - Pre-deleted tiling task ID.
        Returns:
        Whether it is deleted successfully or not. True for deletion successful.
        Since:
        6.1.3
      • notifyTaskCompleted

        public boolean notifyTaskCompleted(java.lang.String jobId,
                                  java.lang.String taskId,
                                  java.lang.String workerId,
                                  TileTaskBuildResult result)
        

        Notifies the tiling master node that a tiling task was successful.

        Specified by:
        notifyTaskCompleted in interface TileMaster
        Parameters:
        jobId -
        taskId -
        workerId -
        result -
        Returns:
        Since:
        6.1.3
      • analystBlankTile

        public void analystBlankTile(java.lang.String jobId)
        

        Notifies a named tiling job began to analysis the white chart information

        Specified by:
        analystBlankTile in interface TileMaster
        Parameters:
        jobId -
        Since:
        6.1.3
      • getBlankTileInfos

        public BlankTileInfo getBlankTileInfos(java.lang.String jobId,
                                      double scale,
                                      int fromIndex,
                                      int toIndex)
        

        Returns all the white chart information

        Specified by:
        getBlankTileInfos in interface TileMaster
        Parameters:
        jobId -
        scale -
        fromIndex -
        toIndex -
        Returns:
        Since:
        6.1.3
      • updateBlankRegion

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

        Submits a confirmation message of the white chart information

        Specified by:
        updateBlankRegion in interface TileMaster
        Parameters:
        jobId -
        scale -
        invalidRegionIds -
        validRegionIds -
        noneMarkedRegionIds -
        markAllInvalid -
        markedAllValid -
        Since:
        6.1.3
      • confirmBlanRegionInfos

        public java.lang.String confirmBlanRegionInfos(java.lang.String jobId)
        
        Confirm the white block information. After confirmation, TileServer will create a new job to start reshaping the white area.

        Specified by:
        confirmBlanRegionInfos in interface TileMaster
        Parameters:
        jobId -
        Returns:
        New created JobId.
        Since:
        6.1.3
      • getWorkerState

        public TileWorkerState getWorkerState(java.lang.String workerId)
        

        Returns the state of a named tiling node

        Specified by:
        getWorkerState in interface TileMaster
        Parameters:
        workerId -
        Returns:
        Since:
        6.1.3
      • setTileWorkerClientFactory

        public void setTileWorkerClientFactory(TileWorkerClientFactory value)
        

        Binds the child node generator.

        Parameters:
        value -
      • dispose

        public void dispose()
        

        Release resources.

        Specified by:
        dispose in interface Disposable