net.sf.jfilesync.sync2
Class SyncComparator
java.lang.Object
java.lang.Thread
net.sf.gnocchi.GWorker
net.sf.jfilesync.sync2.SyncComparator
- All Implemented Interfaces:
- java.lang.Runnable
public class SyncComparator
- extends net.sf.gnocchi.GWorker
| Nested classes/interfaces inherited from class java.lang.Thread |
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Fields inherited from class net.sf.gnocchi.GWorker |
STATE_DIED, STATE_DONE, STATE_INTERRUPTED, STATE_READY, STATE_RUNNING |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Methods inherited from class net.sf.gnocchi.GWorker |
addObserver, cancel, customCancel, getException, getObserver, getWorkerState, hasDied, isCancelled, isDone, isFinished, isRunning, run, setDied |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
con1
private final AbstractConnectionProxy con1
con2
private final AbstractConnectionProxy con2
tree1
private final SyncTree tree1
tree2
private final SyncTree tree2
syncMethod
private final SyncMethod syncMethod
pathControl1
private final TPathControlInterface pathControl1
pathControl2
private final TPathControlInterface pathControl2
TAKE_LEFT
private static final int TAKE_LEFT
- See Also:
- Constant Field Values
TAKE_BOTH
private static final int TAKE_BOTH
- See Also:
- Constant Field Values
TAKE_RIGHT
private static final int TAKE_RIGHT
- See Also:
- Constant Field Values
syncID
private int syncID
pathComparator
private final AbstractSyncPathComparator pathComparator
sorter
private final ISyncFileSorter sorter
filesDone
private int filesDone
files1
private int files1
files2
private int files2
syncDiffTrees
private SyncDiffTree[] syncDiffTrees
settings
private final SyncSettings settings
LOGGER
private static final java.util.logging.Logger LOGGER
SyncComparator
public SyncComparator(int syncID,
AbstractConnectionProxy con1,
SyncTree tree1,
AbstractConnectionProxy con2,
SyncTree tree2,
SyncMethod syncMethod)
getSyncID
public int getSyncID()
task
public void task()
throws java.lang.Exception
- Specified by:
task in class net.sf.gnocchi.GWorker
- Throws:
java.lang.Exception
validateData
private boolean validateData()
validateTree
private boolean validateTree(SyncTree tree12)
construct
public net.sf.gnocchi.GWorkerEvent construct()
- Specified by:
construct in class net.sf.gnocchi.GWorker
comparePaths
protected SyncDiffTree[] comparePaths(SyncFile file1,
SyncFile file2)
throws SyncException,
java.io.IOException
- Throws:
SyncException
java.io.IOException
setQueueUnique
private void setQueueUnique(SyncComparator.SyncFileQueue queue,
java.util.List<SyncDiff> diffList)
setFileUnique
private void setFileUnique(SyncFile file,
java.util.List<SyncDiff> diffList)
setSubDirsUnique
private void setSubDirsUnique(SyncDiff node)
fileDone
private void fileDone()
compareFiles
protected void compareFiles(SyncFile file1,
java.util.List<SyncDiff> diffList1,
SyncFile file2,
java.util.List<SyncDiff> diffList2)
throws java.io.IOException
- Throws:
java.io.IOException
getProgress
private int getProgress()