Class CMFileSyncManager


public class CMFileSyncManager extends CMServiceManager
  • Constructor Details

    • CMFileSyncManager

      public CMFileSyncManager(CMInfo cmInfo)
  • Method Details

    • getClientSyncHome

      public Path getClientSyncHome()
    • getServerSyncHome

      public Path getServerSyncHome(String userName)
    • sync

      public boolean sync()
    • createPathList

      public List<Path> createPathList(Path syncHome)
    • checkNewTransferForSync

      public void checkNewTransferForSync(CMFileEvent fe)
    • completeNewFileTransfer

      public boolean completeNewFileTransfer(String userName, Path path)
    • skipUpdateFile

      public boolean skipUpdateFile(String userName, Path basisFile)
    • completeUpdateFile

      public boolean completeUpdateFile(String userName, Path path)
    • isCompleteFileSync

      public boolean isCompleteFileSync(String userName)
    • completeFileSync

      public boolean completeFileSync(String userName)
    • calculateWeakChecksum

      public int calculateWeakChecksum(ByteBuffer buffer)
    • calculateWeakChecksumElements

      public int[] calculateWeakChecksumElements(ByteBuffer buffer)
    • calculateStrongChecksum

      public byte[] calculateStrongChecksum(ByteBuffer buffer)
    • calculateFileChecksum

      public byte[] calculateFileChecksum(Path path)
    • updateWeakChecksum

      public int[] updateWeakChecksum(int oldA, int oldB, byte oldStartByte, byte newEndByte, int blockSize)
    • calculateWeakChecksum

      public int calculateWeakChecksum(Path path, int blockSize)
    • getTempPathOfBasisFile

      public Path getTempPathOfBasisFile(Path basisFilePath)
    • startWatchService

      public boolean startWatchService()
    • stopWatchService

      public boolean stopWatchService()
    • requestOnlineMode

      public boolean requestOnlineMode(List<Path> pathList)
    • requestLocalMode

      public boolean requestLocalMode(List<Path> pathList)
    • checkTransferForLocalMode

      public void checkTransferForLocalMode(CMFileEvent fe)
    • startFileSync

      public boolean startFileSync(CMFileSyncMode fileSyncMode)
    • stopFileSync

      public boolean stopFileSync()
    • saveOnlineModePathSizeMapToFile

      public boolean saveOnlineModePathSizeMapToFile()
    • createTestFile

      public boolean createTestFile(Path path, long size)
    • createModifiedTestFile

      public boolean createModifiedTestFile(Path path, Path modPath, CMTestFileModType modType, int percentage)
    • closeDirectBuffer

      public void closeDirectBuffer(ByteBuffer cb)
    • getSyncDirectoryList

      public List<Path> getSyncDirectoryList()
    • calculateDirActivationRatio

      public double calculateDirActivationRatio(Path dir)
    • startProactiveOnlineMode

      public boolean startProactiveOnlineMode(Path dir)
    • startProactiveLocalMode

      public boolean startProactiveLocalMode(Path dir)
    • isOnlineMode

      public boolean isOnlineMode(Path path)
    • simulateDeactivatingFileAccess

      public boolean simulateDeactivatingFileAccess(String fileName)
    • simulateActivatingFileAccess

      public boolean simulateActivatingFileAccess(String fileName)
    • clearSyncHome

      public void clearSyncHome()
    • getOnlineModeFiles

      public List<Path> getOnlineModeFiles()
    • getLocalModeFiles

      public List<Path> getLocalModeFiles()