public class DefaultJobRunner extends java.lang.Object implements JobRunner, Disposable
| Constructor and Description |
|---|
DefaultJobRunner() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(JobRunnerListener listener)
Add listener.
|
void |
addWorker(TileWorkerClient worker)
Adds the tiling node.
|
void |
addWorkers(java.util.List<TileWorkerClient> workers2Add)
Adds the tiling node.
|
protected TileScaleInfo |
caculateTileScaleInfo(ScaleBuildConfig scaleConfig, Geometry[] regions) |
void |
confirmBlankRegionInfos(java.lang.String jobId)
Confirms the white map range.
|
void |
deployJobToWorker(TileWorkerClient client)
Assigns a tiling task to a child node.
|
void |
dispose()
Release the resource object.
|
BlankTileInfo |
getBlankTileInfos(double scale, int fromIndex, int toIndex)
Gets the white map information.
|
JobBuildConfig |
getJobConfig()
Gets task configuration information.
|
java.lang.String |
getRemoteWorkspacePath(JobBuildConfig jobBuildConfig)
Gets the child node workspace path.
|
protected RuntimeJobStateBuilderFactory |
getRuntimeJobStateBuilderFactory() |
JobState |
getState()
Gets Job status.
|
TilesetDesc |
getTilesetDesc()
Get the target information for the task.
|
void |
init(JobBuildConfig pConfig, JobState pState, JobDataDeploy dataDeploy)
Initialize Runner
|
void |
notifyJobDeployCompleted(java.lang.String workerId)
Notifies the tiling master node, and the tiling job is deployed successfully at the tiling node
|
void |
notifyTaskCompleted(java.lang.String taskId, java.lang.String workerId)
Notifies the tiling master node that a unit tiling task completed.
|
void |
notifyTaskCompleted(java.lang.String taskId, java.lang.String workerId, TileTaskBuildResult result)
Notifies the tiling master node that a unit tiling task completed.
|
void |
notifyTaskFailed(java.lang.String taskid, java.lang.String workerId)
Notifies the tiling master node that a unit tiling task failed.
|
void |
notifyWorkerDisconnected(java.lang.String workerId)
Notifies the tiling master node that a child node connection failed.
|
void |
setDeployTaskThreadCount(int deployTaskThreadCount) |
void |
setTileCountPerTask(long value)
Sets the number of tiles assigned to each unit's tiling task.
|
void |
setTileRegionManager(TileRegionStateManager tileRegionStateManager)
Set the Tile Area Manager.
|
void |
start()
Starts the task.
|
void |
stop()
Stops the task.
|
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.
|
void |
updateTileJob(Tile[] tiles)
Updates the tiling task.
|
public void init(JobBuildConfig pConfig, JobState pState, JobDataDeploy dataDeploy)
JobRunnerpublic void addListener(JobRunnerListener listener)
JobRunnerAdd listener.
addListener in interface JobRunnerpublic void deployJobToWorker(TileWorkerClient client)
JobRunnerAssigns a tiling task to a child node.
deployJobToWorker in interface JobRunnerpublic void start()
JobRunnerStarts the task.
protected TileScaleInfo caculateTileScaleInfo(ScaleBuildConfig scaleConfig, Geometry[] regions)
public void addWorker(TileWorkerClient worker)
Adds the tiling node.
worker -public void stop()
JobRunnerStops the task.
public void addWorkers(java.util.List<TileWorkerClient> workers2Add)
JobRunnerAdds the tiling node.
addWorkers in interface JobRunnerpublic JobState getState()
JobRunnerpublic TilesetDesc getTilesetDesc()
JobRunnergetTilesetDesc in interface JobRunnerpublic void setTileCountPerTask(long value)
JobRunnerSets the number of tiles assigned to each unit's tiling task. For a unit tiling task, see TileTask.
setTileCountPerTask in interface JobRunnervalue - The number of tiles.public void notifyJobDeployCompleted(java.lang.String workerId)
JobRunnerNotifies the tiling master node, and the tiling job is deployed successfully at the tiling node
notifyJobDeployCompleted in interface JobRunner
public void notifyTaskCompleted(java.lang.String taskId,
java.lang.String workerId)
JobRunnerNotifies the tiling master node that a unit tiling task completed.
notifyTaskCompleted in interface JobRunnertaskId - The completed Unit tiling task ID.workerId - TaskId unit tiling task where the worker exists.
public void notifyTaskCompleted(java.lang.String taskId,
java.lang.String workerId,
TileTaskBuildResult result)
JobRunnerNotifies the tiling master node that a unit tiling task completed.
notifyTaskCompleted in interface JobRunner
public void notifyTaskFailed(java.lang.String taskid,
java.lang.String workerId)
JobRunnerNotifies the tiling master node that a unit tiling task failed.
notifyTaskFailed in interface JobRunnerpublic void notifyWorkerDisconnected(java.lang.String workerId)
JobRunnerNotifies the tiling master node that a child node connection failed.
notifyWorkerDisconnected in interface JobRunnerpublic java.lang.String getRemoteWorkspacePath(JobBuildConfig jobBuildConfig)
Gets the child node workspace path.
jobBuildConfig -public JobBuildConfig getJobConfig()
JobRunnerGets task configuration information.
getJobConfig in interface JobRunnerpublic void dispose()
DisposableRelease the resource object.
dispose in interface Disposablepublic void updateTileJob(Tile[] tiles)
JobRunnerUpdates the tiling task.
updateTileJob in interface JobRunnerpublic BlankTileInfo getBlankTileInfos(double scale, int fromIndex, int toIndex)
JobRunnerGets the white map information.
getBlankTileInfos in interface JobRunnerpublic void confirmBlankRegionInfos(java.lang.String jobId)
JobRunnerConfirms the white map range.
confirmBlankRegionInfos in interface JobRunner
public void updateBlankRegions(double scale,
java.lang.String[] invalidRegionIds,
java.lang.String[] validRegionIds,
java.lang.String[] noneMarkedRegionIds,
boolean markAllInvalid,
boolean markAllValid)
JobRunnerUpdates the white map range.
updateBlankRegions in interface JobRunnerpublic void setTileRegionManager(TileRegionStateManager tileRegionStateManager)
JobRunnerSet the Tile Area Manager.
setTileRegionManager in interface JobRunnerprotected RuntimeJobStateBuilderFactory getRuntimeJobStateBuilderFactory()
public void setDeployTaskThreadCount(int deployTaskThreadCount)