Class StripingFilesystemTracker
java.lang.Object
org.alfresco.repo.bulkimport.impl.AbstractFilesystemTracker
org.alfresco.repo.bulkimport.impl.StripingFilesystemTracker
- All Implemented Interfaces:
FilesystemTracker
A filesystem walker that returns all files and directories in subsequent levels of a filesystem tree; it returns all directories and files in a given level, at which point it moves on to the next level and starts returning directories and files in that level.
- Since:
- 4.0
-
Field Summary
Fields inherited from class org.alfresco.repo.bulkimport.impl.AbstractFilesystemTracker
directoryAnalyser, logger -
Constructor Summary
ConstructorsConstructorDescriptionStripingFilesystemTracker(DirectoryAnalyser directoryAnalyser, NodeRef target, File sourceFolder, int batchSize) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddDirectoriesToProcess(Collection<ImportableItem> dirsToAdd, int level) protected voidaddDirectoryToProcess(ImportableItem dir, int level) protected voidintcount()An estimate of the number of directories and files in the filesystem.protected List<ImportableItem>getDirectoriesToProcess(int level) protected ImportableItemprotected List<ImportableItem>getImportableItems(int count) protected voidvoiditemImported(NodeRef nodeRef, ImportableItem importableItem) A callback to indicate that the item has been imported into the repository.booleanintMethods inherited from class org.alfresco.repo.bulkimport.impl.AbstractFilesystemTracker
afterPropertiesSet, getImportableDirectoriesInDirectory, getImportableItemsInDirectory, setDirectoryAnalyser
-
Constructor Details
-
StripingFilesystemTracker
public StripingFilesystemTracker(DirectoryAnalyser directoryAnalyser, NodeRef target, File sourceFolder, int batchSize)
-
-
Method Details
-
addDirectoriesToProcess
-
addDirectoryToProcess
-
getDirectoriesToProcess
-
count
public int count()Description copied from interface:FilesystemTrackerAn estimate of the number of directories and files in the filesystem.- Returns:
- int
-
incrementLevel
protected void incrementLevel() -
itemImported
Description copied from interface:FilesystemTrackerA callback to indicate that the item has been imported into the repository.- Parameters:
nodeRef- NodeRefimportableItem- ImportableItem
-
addItemsToProcess
-
getDirectoryToProcess
-
moreLevels
public boolean moreLevels() -
numDirectoriesToProcess
public int numDirectoriesToProcess() -
getImportableItems
-
getWorkProvider
-