public class DefaultTileWorker extends java.lang.Object implements TileWorker, Disposable
Tiling sub node
| Modifier and Type | Class and Description |
|---|---|
static interface |
DefaultTileWorker.JobDeployedCallBack |
| Constructor and Description |
|---|
DefaultTileWorker()
The Constructor.
|
DefaultTileWorker(DefaultTileTaskRunnerFactory runnerfactory, DefaultTileStoreFactory storeFactory, MapBuilder mapBuilder, TileMasterClientFactory tileMasterClientFactory)
The Constructor.
|
DefaultTileWorker(RestContext restContext)
The Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
JobExecutingStates |
addTask(TileTask task)
Adds Unit tiling Task.
|
boolean |
deployData(ProviderConnInfo[] providerConnectionInfos, java.lang.String masterAddress, boolean readOnly, java.lang.String id, FileVerificationMode verificationMode)
Deploys the tiling data.
|
boolean |
deployJob(JobBuildConfig pConfig)
Deploys the task, after receiving the task, after the parameter check, start the asynchronous deployment, immediately return
|
void |
dispose()
Release the resource object.
|
boolean |
doDeployJob(JobBuildConfig pConfig, DefaultTileWorker.JobDeployedCallBack callback)
Starts the deployment task.
|
JobExecutingStates |
getJobExecutingStates()
Gets the tiling task status.
|
protected static KeyValueStore |
getKeyValueStore(TileSourceInfo storeConfig) |
TileTaskState |
getTaskState(java.lang.String tileTaskId)
Gets the unit tile task status.
|
protected void |
insureKvStoreExist(JobBuildConfig pJobConfig) |
boolean |
notifyJobCompleted(java.lang.String jobId)
Notifies the TileWorker node that the tiling task has been completed and can turn off some of the resources (eg thread, memory pool, etc.) for the application.
|
void |
setDataManager(WorkerDataManager value)
Setup Manager.
|
void |
setMapBuilder(MapBuilder value)
Sets MapBuilder.
|
void |
setMaster(TileMaster value)
Setting tiling master node.
|
void |
setRealspaceBuilder(RealspaceBuilder value)
Sets RealspaceBuilder
|
void |
setRestContext(RestContext value)
Sets the Rest context information.
|
boolean |
stopDeployData(java.lang.String[] masterSideIds)
Notifies the TileWorker node to stop downloading data.
|
JobExecutingStates |
whatAreYouDoing()
Gets the tiling task status.
|
public DefaultTileWorker()
The Constructor.
public DefaultTileWorker(RestContext restContext)
The Constructor.
restContext -public DefaultTileWorker(DefaultTileTaskRunnerFactory runnerfactory, DefaultTileStoreFactory storeFactory, MapBuilder mapBuilder, TileMasterClientFactory tileMasterClientFactory)
The Constructor.
runnerfactory -storeFactory -mapBuilder -tileMasterClientFactory -public void setDataManager(WorkerDataManager value)
Setup Manager.
value -public boolean deployData(ProviderConnInfo[] providerConnectionInfos, java.lang.String masterAddress, boolean readOnly, java.lang.String id, FileVerificationMode verificationMode) throws java.io.IOException
TileWorkerDeploys the tiling data.
deployData in interface TileWorkerjava.io.IOExceptionpublic boolean stopDeployData(java.lang.String[] masterSideIds)
TileWorkerNotifies the TileWorker node to stop downloading data.
stopDeployData in interface TileWorkerpublic boolean deployJob(JobBuildConfig pConfig)
Deploys the task, after receiving the task, after the parameter check, start the asynchronous deployment, immediately return
deployJob in interface TileWorkerpConfig -public boolean doDeployJob(JobBuildConfig pConfig, DefaultTileWorker.JobDeployedCallBack callback)
Starts the deployment task.
pConfig -callback -public JobExecutingStates addTask(TileTask task)
TileWorkerAdds Unit tiling Task.
addTask in interface TileWorkerpublic JobExecutingStates whatAreYouDoing()
TileWorkerGets the tiling task status.
whatAreYouDoing in interface TileWorkerpublic TileTaskState getTaskState(java.lang.String tileTaskId)
TileWorkerGets the unit tile task status.
getTaskState in interface TileWorkerpublic void dispose()
DisposableRelease the resource object.
dispose in interface Disposablepublic void setMapBuilder(MapBuilder value)
Sets MapBuilder.
value -public void setRealspaceBuilder(RealspaceBuilder value)
Sets RealspaceBuilder
value -public void setRestContext(RestContext value)
Sets the Rest context information.
value -public JobExecutingStates getJobExecutingStates()
Gets the tiling task status.
protected void insureKvStoreExist(JobBuildConfig pJobConfig)
protected static KeyValueStore getKeyValueStore(TileSourceInfo storeConfig)
public void setMaster(TileMaster value)
Setting tiling master node.
value -public boolean notifyJobCompleted(java.lang.String jobId)
TileWorkerTileMasternotifyJobCompleted in interface TileWorker