Class Preference

java.lang.Object
de.spiritscorp.datasync.io.Preference

public final class Preference extends Object
Isolated parameters state tracker mapped to a dedicated profile workspace scope.
Version:
2.0.0
Author:
Tom Spirit
  • 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:
      true if both the last scan file and the synchronization map were successfully removed (or did not exist); false if 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 ioSyncMap handler.

    • getJobName

      public String getJobName()
    • getSourcePaths

      public ArrayList<Path> getSourcePaths()
    • setSourcePaths

      public void setSourcePaths(ArrayList<Path> sourcePaths)
    • setSourcePath

      public void setSourcePath(Path sourcePath)
    • removeSourcePath

      public void removeSourcePath(Path sourcePath)
    • getDestPaths

      public ArrayList<Path> getDestPaths()
    • setDestPaths

      public void setDestPaths(ArrayList<Path> destPaths)
    • getSyncMap

      public Map<Path, FileAttributes> getSyncMap()
    • getScanMode

      public ScanType getScanMode()
    • setScanMode

      public void setScanMode(ScanType scanMode)
    • getBgTime

      public BgTime getBgTime()
    • setBgTime

      public void setBgTime(BgTime time)
    • 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

      public Path getTrashbinPath()