|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectIndexSync
public class IndexSync
Takes care of copying the differences between a source index and a dest index to make them exactly equal. Doesn't have to scan every data directory and lazy file, since it uses the DocSelCache to get an idea of the subset of things that actually need to be scanned.
Field Summary | |
---|---|
private static SimpleDateFormat |
dateFormat
|
Constructor Summary | |
---|---|
IndexSync()
|
Method Summary | |
---|---|
private SubDirFilter |
calcFilter(String indexName,
File srcDir,
File dstDir)
Determine the sub-directory filter for directory scanning. |
static String |
newestTime(File dir)
Determine the newest file within a directory (or the dir itself if empty) and return a human-readable version of that time. |
static String |
oldestTime(File dir)
Determine the oldest file within a directory (or the dir itself if empty) and return a human-readable version of that time. |
void |
syncDirs(String indexName,
File srcDir,
File dstDir)
Perform the minimum necessary work to ensure that the contents of dstDir exactly match srcDir. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static SimpleDateFormat dateFormat
Constructor Detail |
---|
public IndexSync()
Method Detail |
---|
public void syncDirs(String indexName, File srcDir, File dstDir) throws IOException
indexName
-
IOException
- If anything goes wrong.private SubDirFilter calcFilter(String indexName, File srcDir, File dstDir) throws IOException
IOException
- If anything goes wrong.public static String oldestTime(File dir)
public static String newestTime(File dir)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |