org.alfresco.repo.bulkimport.impl
Class MultiThreadedBulkFilesystemImporter

java.lang.Object
  extended by org.alfresco.repo.bulkimport.impl.AbstractBulkFilesystemImporter
      extended by org.alfresco.repo.bulkimport.impl.MultiThreadedBulkFilesystemImporter
All Implemented Interfaces:
BulkFilesystemImporter, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
Direct Known Subclasses:
StripingBulkFilesystemImporter

public abstract class MultiThreadedBulkFilesystemImporter
extends AbstractBulkFilesystemImporter

Performs a multi-threaded filesystem import into the repository using the BatchProcessor.

Since:
4.0

Field Summary
protected  int defaultBatchSize
           
protected  int defaultLoggingInterval
           
protected  int defaultNumThreads
           
protected static org.apache.commons.logging.Log logger
           
 
Fields inherited from class org.alfresco.repo.bulkimport.impl.AbstractBulkFilesystemImporter
applicationContext, behaviourFilter, directoryAnalyser, fileFolderService, importStatus, jobLockService, permissionService, ruleService, transactionHelper, transactionService
 
Constructor Summary
MultiThreadedBulkFilesystemImporter()
           
 
Method Summary
protected  void bulkImportImpl(BulkImportParameters bulkImportParameters, NodeImporter nodeImporter, java.lang.String lockToken)
          Method that does the work of importing a filesystem using the BatchProcessor.
protected  BatchProcessor getBatchProcessor(BulkImportParameters bulkImportParameters, BatchProcessWorkProvider workProvider, int loggingInterval)
           
protected  int getBatchSize(BulkImportParameters bulkImportParameters)
           
 int getDefaultBatchSize()
           
 int getDefaultNumThreads()
           
protected  int getLoggingInterval(BulkImportParameters bulkImportParameters)
           
protected  int getNumThreads(BulkImportParameters bulkImportParameters)
           
protected  BatchProcessor.BatchProcessWorker getWorker(BulkImportParameters bulkImportParameters, java.lang.String lockToken, NodeImporter nodeImporter, FilesystemTracker filesystemTracker)
           
 void setDefaultBatchSize(int defaultBatchSize)
           
 void setDefaultNumThreads(int defaultNumThreads)
           
 
Methods inherited from class org.alfresco.repo.bulkimport.impl.AbstractBulkFilesystemImporter
afterPropertiesSet, asyncBulkImport, bulkImport, getFileName, getLock, getLockToken, getRepositoryPath, getStatus, mapToString, refreshLock, releaseLock, setApplicationContext, setBehaviourFilter, setDirectoryAnalyser, setFileFolderService, setImportStatus, setJobLockService, setPermissionService, setRuleService, setTransactionService, validateNodeRefIsWritableSpace, validateSourceIsReadableDirectory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.commons.logging.Log logger

defaultBatchSize

protected int defaultBatchSize

defaultNumThreads

protected int defaultNumThreads

defaultLoggingInterval

protected int defaultLoggingInterval
Constructor Detail

MultiThreadedBulkFilesystemImporter

public MultiThreadedBulkFilesystemImporter()
Method Detail

getLoggingInterval

protected int getLoggingInterval(BulkImportParameters bulkImportParameters)

getBatchSize

protected int getBatchSize(BulkImportParameters bulkImportParameters)

getNumThreads

protected int getNumThreads(BulkImportParameters bulkImportParameters)

getWorker

protected BatchProcessor.BatchProcessWorker getWorker(BulkImportParameters bulkImportParameters,
                                                      java.lang.String lockToken,
                                                      NodeImporter nodeImporter,
                                                      FilesystemTracker filesystemTracker)

getBatchProcessor

protected BatchProcessor getBatchProcessor(BulkImportParameters bulkImportParameters,
                                           BatchProcessWorkProvider workProvider,
                                           int loggingInterval)

setDefaultNumThreads

public void setDefaultNumThreads(int defaultNumThreads)

setDefaultBatchSize

public void setDefaultBatchSize(int defaultBatchSize)

getDefaultNumThreads

public int getDefaultNumThreads()

getDefaultBatchSize

public int getDefaultBatchSize()

bulkImportImpl

protected void bulkImportImpl(BulkImportParameters bulkImportParameters,
                              NodeImporter nodeImporter,
                              java.lang.String lockToken)
Method that does the work of importing a filesystem using the BatchProcessor.

Specified by:
bulkImportImpl in class AbstractBulkFilesystemImporter
Parameters:
bulkImportParameters - The bulk import parameters to apply to this bulk import.
nodeImporter - The node importer implementation that will import each node.
lockToken - The lock token to use during the bulk import.


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.