public class DefaultTileMaster extends java.lang.Object implements TileMaster, ComponentContextAware
| Modifier and Type | Class and Description | 
|---|---|
| protected static class  | DefaultTileMaster.StateSaver | 
| Constructor and Description | 
|---|
| DefaultTileMaster()The Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected TileJob | addJob(JobBuildConfig processed, JobState state) | 
| TileJob | addJob(JobInfo jobInfo)Creates a tiling job | 
| boolean | addTileWorker(TileWorkerInfo connInfo)Adds the tiling node. | 
| void | analystBlankTile(java.lang.String jobId)Notifies a named tiling job began to analysis the white chart information | 
| java.lang.String | confirmBlanRegionInfos(java.lang.String jobId)Confirm the white block information. | 
| boolean | deleteJob(java.lang.String jobID)Deletes the tiling task | 
| void | dispose()Release resources. | 
| BlankTileInfo | getBlankTileInfos(java.lang.String jobId, double scale, int fromIndex, int toIndex)Returns all the white chart information | 
| TileJob | getTileJob(java.lang.String jobID)Returns a named tiling job information | 
| java.util.List<TileJob> | getTileJobs()Returns all tiling job information | 
| TileWorkerState | getWorkerState(java.lang.String workerId)Returns the state of a named tiling node | 
| TileWorkerState[] | getWorkerStates()Returns the status of all tiling nodes. | 
| TileSourceInfo | handleUserDefinedInfo(TileSourceInfo info)Gets the tile source information in the TileSource container. | 
| protected JobRunner | initJobRunner(JobBuildConfig processed, JobState state, boolean completed) | 
| protected TileJob | initTileJob(JobBuildConfig processed, JobRunner runner) | 
| 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 | 
| 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. | 
| 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. | 
| 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. | 
| void | redeployJobToWorker(java.lang.String jobId, java.lang.String workerId)When deploying a tiling task to a worker fails, it is used for redeployment. | 
| void | removeTileWorker(java.lang.String workerId)Removes the tiling node. | 
| void | restart(java.lang.String jobId)Restarts the tiling job | 
| void | setComponentContext(ComponentContext context)Sets the service component context information. | 
| void | setJobInfoPREProcessor(JobInfoPREProcessor processor)Sets the tiling Job Preprocessor | 
| void | setJobRunnerFactory(JobRunnerFactory factory)Sets the tile operator factory | 
| void | setRestContext(RestContext value)Sets the Rest context information. | 
| void | setTileWorkerClientFactory(TileWorkerClientFactory value)Binds the child node generator. | 
| void | startJob(java.lang.String jobId)Starts the tiling job | 
| void | stopJob(java.lang.String jobId)Stops the tiling job | 
| 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 | 
| void | workerQuit(TileWorkerInfo conInfo)Notifies the tiling master node that the tiling task Has been withdrawn. | 
public void redeployJobToWorker(java.lang.String jobId,
                       java.lang.String workerId)
TileMasterWhen deploying a tiling task to a worker fails, it is used for redeployment.
redeployJobToWorker in interface TileMasterjobId - The task id needs to be redeployed.workerId - Needs to redeploy the worker's id.public void setRestContext(RestContext value)
Sets the Rest context information.
value -public boolean addTileWorker(TileWorkerInfo connInfo)
Adds the tiling node.
addTileWorker in interface TileMasterconInfo -public void removeTileWorker(java.lang.String workerId)
Removes the tiling node.
removeTileWorker in interface TileMasterworkerId -public void workerQuit(TileWorkerInfo conInfo)
Notifies the tiling master node that the tiling task Has been withdrawn.
workerQuit in interface TileMasterconInfo -public void stopJob(java.lang.String jobId)
Stops the tiling job
stopJob in interface TileMasterjobId -public void startJob(java.lang.String jobId)
Starts the tiling job
startJob in interface TileMasterjobId -public void restart(java.lang.String jobId)
Restarts the tiling job
restart in interface TileMasterjobId -public TileJob addJob(JobInfo jobInfo)
Creates a tiling job
addJob in interface TileMasterl -public TileSourceInfo handleUserDefinedInfo(TileSourceInfo info)
Gets the tile source information in the TileSource container.
l -public void setJobInfoPREProcessor(JobInfoPREProcessor processor)
Sets the tiling Job Preprocessor
setJobInfoPREProcessor in interface TileMasterprocessor -public void setJobRunnerFactory(JobRunnerFactory factory)
Sets the tile operator factory
setJobRunnerFactory in interface TileMasterfactory -public java.util.List<TileJob> getTileJobs()
Returns all tiling job information
getTileJobs in interface TileMasterpublic TileJob getTileJob(java.lang.String jobID)
Returns a named tiling job information
getTileJob in interface TileMasterjobID - Tiling task ID.
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
notifyJobDeployCompleted in interface TileMasterjobId - Tiling task ID.workerId - Tiling node ID.
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.
notifyTaskCompleted in interface TileMasterjobId - Tiling task ID.taskId - Unit tiling task ID. See TileTask for unit tiling tasks.workerId - The TileWorker ID of performing the unit task.
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.
notifyTaskFailed in interface TileMasterjobId - Tiling task ID.taskId - Unit tiling task ID. See TileTask for unit tiling tasks.workerId - The TileWorker ID of performing the unit task.public boolean deleteJob(java.lang.String jobID)
Deletes the tiling task
deleteJob in interface TileMasterjobID - Pre-deleted tiling task ID.
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.
notifyTaskCompleted in interface TileMasterjobId -taskId -workerId -result -public void analystBlankTile(java.lang.String jobId)
Notifies a named tiling job began to analysis the white chart information
analystBlankTile in interface TileMasterjobId -public BlankTileInfo getBlankTileInfos(java.lang.String jobId, double scale, int fromIndex, int toIndex)
Returns all the white chart information
getBlankTileInfos in interface TileMasterjobId -scale -fromIndex -toIndex -
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
updateBlankRegion in interface TileMasterjobId -scale -invalidRegionIds -validRegionIds -noneMarkedRegionIds -markAllInvalid -markedAllValid -public java.lang.String confirmBlanRegionInfos(java.lang.String jobId)
confirmBlanRegionInfos in interface TileMasterjobId -public TileWorkerState[] getWorkerStates()
Returns the status of all tiling nodes.
getWorkerStates in interface TileMasterpublic TileWorkerState getWorkerState(java.lang.String workerId)
Returns the state of a named tiling node
getWorkerState in interface TileMasterworkerId -public void setTileWorkerClientFactory(TileWorkerClientFactory value)
Binds the child node generator.
value -public void dispose()
Release resources.
dispose in interface Disposablepublic void setComponentContext(ComponentContext context)
Sets the service component context information.
setComponentContext in interface ComponentContextAwarecontext -protected TileJob addJob(JobBuildConfig processed, JobState state)
protected JobRunner initJobRunner(JobBuildConfig processed, JobState state, boolean completed)
protected TileJob initTileJob(JobBuildConfig processed, JobRunner runner)