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
TileWorker
Deploys the tiling data.
deployData
in interface TileWorker
java.io.IOException
public boolean stopDeployData(java.lang.String[] masterSideIds)
TileWorker
Notifies the TileWorker node to stop downloading data.
stopDeployData
in interface TileWorker
public boolean deployJob(JobBuildConfig pConfig)
Deploys the task, after receiving the task, after the parameter check, start the asynchronous deployment, immediately return
deployJob
in interface TileWorker
pConfig
-public boolean doDeployJob(JobBuildConfig pConfig, DefaultTileWorker.JobDeployedCallBack callback)
Starts the deployment task.
pConfig
-callback
-public JobExecutingStates addTask(TileTask task)
TileWorker
Adds Unit tiling Task.
addTask
in interface TileWorker
public JobExecutingStates whatAreYouDoing()
TileWorker
Gets the tiling task status.
whatAreYouDoing
in interface TileWorker
public TileTaskState getTaskState(java.lang.String tileTaskId)
TileWorker
Gets the unit tile task status.
getTaskState
in interface TileWorker
public void dispose()
Disposable
Release the resource object.
dispose
in interface Disposable
public 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)
TileWorker
TileMaster
notifyJobCompleted
in interface TileWorker