com.supermap.services.components.impl
Class DefaultTileMaster.StateSaver
- java.lang.Object
-
- com.supermap.services.components.impl.DefaultTileMaster.StateSaver
-
- All Implemented Interfaces:
- JobRunnerListener
- Enclosing class:
- DefaultTileMaster
protected static class DefaultTileMaster.StateSaver extends java.lang.Object implements JobRunnerListener
-
-
Constructor Summary
Constructors Constructor and Description DefaultTileMaster.StateSaver()The Constructor.
-
Method Summary
Methods Modifier and Type Method and Description voidaddJob(JobBuildConfig processed, JobState state)Updates the tiling task.protected booleancopyFileQuietly(java.io.File file, java.io.File bakFile)protected voiddeleteBakFile(java.io.File bakFile)voiddispose()Release resources.protected java.io.FilegetConfigFile(java.lang.String key)protected java.io.FilegetStateFile(java.lang.String key)voidload()Read the tiling information from the configuration file.voidnotifyStateInited(JobBuildConfig config, JobState state)Marks the type of the task to be initialization completed.voidnotifyStateUpdated(JobBuildConfig config, JobState state)Marks the type of the task to be update completed.protected <T> Tread(java.lang.Class<T> clz, java.lang.String nodeName, java.io.File file)booleanremove(java.lang.String jobID)Deletes the corresponding configuration file information through the job ID.voidsetDefaultTileMaster(DefaultTileMaster value)Setting tiling master node.voidsetDirectory(java.io.File value)Sets the output folder.protected booleanwriteContentToFile(java.lang.String content, java.io.File file)
-
-
-
Constructor Detail
-
DefaultTileMaster.StateSaver
public DefaultTileMaster.StateSaver()
The Constructor.
-
-
Method Detail
-
dispose
public void dispose()
Release resources.
-
setDirectory
public void setDirectory(java.io.File value) throws java.io.IOExceptionSets the output folder.
- Parameters:
value-- Throws:
java.io.IOException
-
setDefaultTileMaster
public void setDefaultTileMaster(DefaultTileMaster value)
Setting tiling master node.
- Parameters:
value-
-
addJob
public void addJob(JobBuildConfig processed, JobState state)
Updates the tiling task.
- Parameters:
processor-state-
-
load
public void load()
Read the tiling information from the configuration file.
-
notifyStateInited
public void notifyStateInited(JobBuildConfig config, JobState state)
Description copied from interface:JobRunnerListenerMarks the type of the task to be initialization completed.
- Specified by:
notifyStateInitedin interfaceJobRunnerListener
-
notifyStateUpdated
public void notifyStateUpdated(JobBuildConfig config, JobState state)
Description copied from interface:JobRunnerListenerMarks the type of the task to be update completed.
- Specified by:
notifyStateUpdatedin interfaceJobRunnerListener
-
remove
public boolean remove(java.lang.String jobID)
Deletes the corresponding configuration file information through the job ID.
- Parameters:
jobID-- Returns:
-
read
protected <T> T read(java.lang.Class<T> clz, java.lang.String nodeName, java.io.File file)
-
getStateFile
protected java.io.File getStateFile(java.lang.String key)
-
getConfigFile
protected java.io.File getConfigFile(java.lang.String key)
-
copyFileQuietly
protected boolean copyFileQuietly(java.io.File file, java.io.File bakFile)
-
writeContentToFile
protected boolean writeContentToFile(java.lang.String content, java.io.File file)
-
deleteBakFile
protected void deleteBakFile(java.io.File bakFile)
-
-