Package kr.ac.konkuk.ccslab.cm.manager
Class CMFileSyncManager
java.lang.Object
kr.ac.konkuk.ccslab.cm.entity.CMObject
kr.ac.konkuk.ccslab.cm.manager.CMServiceManager
kr.ac.konkuk.ccslab.cm.manager.CMFileSyncManager
-
Field Summary
Fields inherited from class kr.ac.konkuk.ccslab.cm.manager.CMServiceManager
m_cmInfo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
byte[]
calculateFileChecksum
(Path path) byte[]
calculateStrongChecksum
(ByteBuffer buffer) int
calculateWeakChecksum
(ByteBuffer buffer) int
calculateWeakChecksum
(Path path, int blockSize) int[]
void
void
void
void
boolean
completeFileSync
(String userName) boolean
completeNewFileTransfer
(String userName, Path path) boolean
completeUpdateFile
(String userName, Path path) boolean
createModifiedTestFile
(Path path, Path modPath, CMTestFileModType modType, int percentage) createPathList
(Path syncHome) boolean
createTestFile
(Path path, long size) getServerSyncHome
(String userName) getTempPathOfBasisFile
(Path basisFilePath) boolean
isCompleteFileSync
(String userName) boolean
isOnlineMode
(Path path) boolean
requestLocalMode
(List<Path> pathList) boolean
requestOnlineMode
(List<Path> pathList) boolean
boolean
simulateActivatingFileAccess
(String fileName) boolean
simulateDeactivatingFileAccess
(String fileName) boolean
skipUpdateFile
(String userName, Path basisFile) boolean
startFileSync
(CMFileSyncMode fileSyncMode) boolean
boolean
boolean
boolean
boolean
boolean
sync()
int[]
updateWeakChecksum
(int oldA, int oldB, byte oldStartByte, byte newEndByte, int blockSize) Methods inherited from class kr.ac.konkuk.ccslab.cm.manager.CMServiceManager
getCMInfo, setCMInfo
-
Constructor Details
-
CMFileSyncManager
-
-
Method Details
-
getClientSyncHome
-
getServerSyncHome
-
sync
public boolean sync() -
createPathList
-
checkNewTransferForSync
-
completeNewFileTransfer
-
skipUpdateFile
-
completeUpdateFile
-
isCompleteFileSync
-
completeFileSync
-
calculateWeakChecksum
-
calculateWeakChecksumElements
-
calculateStrongChecksum
-
calculateFileChecksum
-
updateWeakChecksum
public int[] updateWeakChecksum(int oldA, int oldB, byte oldStartByte, byte newEndByte, int blockSize) -
calculateWeakChecksum
-
getTempPathOfBasisFile
-
startWatchService
public boolean startWatchService() -
stopWatchService
public boolean stopWatchService() -
requestOnlineMode
-
requestLocalMode
-
checkTransferForLocalMode
-
startFileSync
-
stopFileSync
public boolean stopFileSync() -
saveOnlineModePathSizeMapToFile
public boolean saveOnlineModePathSizeMapToFile() -
createTestFile
-
createModifiedTestFile
public boolean createModifiedTestFile(Path path, Path modPath, CMTestFileModType modType, int percentage) -
closeDirectBuffer
-
getSyncDirectoryList
-
calculateDirActivationRatio
-
startProactiveOnlineMode
-
startProactiveLocalMode
-
isOnlineMode
-
simulateDeactivatingFileAccess
-
simulateActivatingFileAccess
-
clearSyncHome
public void clearSyncHome() -
getOnlineModeFiles
-
getLocalModeFiles
-