Class Preference
java.lang.Object
de.spiritscorp.datasync.io.Preference
Isolated parameters state tracker mapped to a dedicated profile workspace scope.
- Version:
- 2.0.0
- Author:
- Tom Spirit
-
Method Summary
Modifier and TypeMethodDescriptionlongRetrieves the last recorded scan execution timestamp.booleanbooleanbooleanisBgSync()booleanisLogOn()booleanisSubDir()booleanbooleanRemoves the profile by deleting its associated persistent data, including both the last scan time file and the synchronization map.voidremoveSourcePath(Path sourcePath) voidPersists the current timestamp as the last successful scan execution time.voidsetAutoDel(boolean autoDel) voidsetAutoSync(boolean autoSync) voidsetBgSync(boolean bgSync) voidvoidsetDestPaths(ArrayList<Path> destPaths) voidsetLogOn(boolean logOn) voidsetScanMode(ScanType scanMode) voidsetSourcePath(Path sourcePath) voidsetSourcePaths(ArrayList<Path> sourcePaths) voidsetSubDir(boolean subDir) voidsetTrashbin(boolean trashbin) voidPersists the current state of the synchronization map to storage.
-
Method Details
-
saveLastScanTime
public void saveLastScanTime()Persists the current timestamp as the last successful scan execution time. -
getLastScanTime
public long getLastScanTime()Retrieves the last recorded scan execution timestamp.- Returns:
- Unix epoch millis, or 0 if no timer token exists yet.
-
removeProfile
public boolean removeProfile()Removes the profile by deleting its associated persistent data, including both the last scan time file and the synchronization map.This method ensures that both deletion operations are attempted, regardless of whether the first operation succeeded.
- Returns:
trueif both the last scan file and the synchronization map were successfully removed (or did not exist);falseif either operation encountered an error.
-
writeSyncMap
public void writeSyncMap()Persists the current state of the synchronization map to storage.Actual I/O operations are delegated to the underlying
ioSyncMaphandler. -
getJobName
-
getSourcePaths
-
setSourcePaths
-
setSourcePath
-
removeSourcePath
-
getDestPaths
-
setDestPaths
-
getSyncMap
-
getScanMode
-
setScanMode
-
getBgTime
-
setBgTime
-
isLogOn
public boolean isLogOn() -
setLogOn
public void setLogOn(boolean logOn) -
isSubDir
public boolean isSubDir() -
setSubDir
public void setSubDir(boolean subDir) -
isAutoDel
public boolean isAutoDel() -
setAutoDel
public void setAutoDel(boolean autoDel) -
isAutoSync
public boolean isAutoSync() -
setAutoSync
public void setAutoSync(boolean autoSync) -
isBgSync
public boolean isBgSync() -
setBgSync
public void setBgSync(boolean bgSync) -
isTrashbin
public boolean isTrashbin() -
setTrashbin
public void setTrashbin(boolean trashbin) -
getTrashbinPath
-