Class GenericMultiThreadedImporter
java.lang.Object
org.nuxeo.ecm.platform.importer.base.GenericMultiThreadedImporter
- All Implemented Interfaces:
Runnable
,ImporterRunner
Generic importer
- Author:
- Thierry Delprat
-
Field Summary
Modifier and TypeFieldDescriptionprotected Integer
protected static final int
protected boolean
protected ImporterDocumentModelFactory
protected List<ImporterFilter>
protected List<ImportingDocumentFilter>
protected SourceNode
protected static ThreadPoolExecutor
protected String
protected String
protected List<ImporterListener>
protected ImporterLogger
protected Integer
protected static final String[]
protected int
protected String
protected GenericThreadedImportTask
protected CoreSession
protected Boolean
protected DocumentModel
protected ImporterThreadingPolicy
protected Integer
-
Constructor Summary
ConstructorDescriptionGenericMultiThreadedImporter
(ImporterRunnerConfiguration configuration) GenericMultiThreadedImporter
(SourceNode sourceNode, String importWritePath, Boolean skipRootContainerCreation, Integer batchSize, Integer nbThreads, String jobName, ImporterLogger log) GenericMultiThreadedImporter
(SourceNode sourceNode, String importWritePath, Boolean skipRootContainerCreation, Integer batchSize, Integer nbThreads, ImporterLogger log) GenericMultiThreadedImporter
(SourceNode sourceNode, String importWritePath, Boolean skipRootContainerCreation, Integer batchSize, Integer nbThreads, ImporterLogger log, int queueSize) GenericMultiThreadedImporter
(SourceNode sourceNode, String importWritePath, Integer batchSize, Integer nbThreads, String jobName, ImporterLogger log) GenericMultiThreadedImporter
(SourceNode sourceNode, String importWritePath, Integer batchSize, Integer nbThreads, ImporterLogger log) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addCreatedDoc
(String taskId, long nbDocs) void
addFilter
(ImporterFilter filter) void
addImportingDocumentFilters
(Collection<ImportingDocumentFilter> importingDocumentFilters) void
addImportingDocumentFilters
(ImportingDocumentFilter... importingDocumentFilters) void
addListeners
(Collection<ImporterListener> listeners) void
addListeners
(ImporterListener... listeners) protected DocumentModel
Creates the target container where the import will // TODO Auto-generated constructor stub }be done.protected void
doRun()
static long
static ThreadPoolExecutor
protected DocumentModel
protected GenericThreadedImportTask
initRootTask
(SourceNode importSource, DocumentModel targetContainer, boolean skipRootContainerCreation, ImporterLogger log, Integer batchSize, String jobName) protected void
protected void
void
run()
void
setEnablePerfLogging
(boolean enablePerfLogging) void
setFactory
(ImporterDocumentModelFactory factory) void
setRepositoryName
(String repositoryName) void
setRootImportTask
(GenericThreadedImportTask rootImportTask) void
setThreadPolicy
(ImporterThreadingPolicy threadPolicy) void
setTransactionTimeout
(int transactionTimeout) protected static void
sleep
(int millis) void
-
Field Details
-
importTP
-
nbCreatedDocsByThreads
-
threadPolicy
-
factory
-
importSource
-
targetContainer
-
batchSize
-
nbThreads
-
transactionTimeout
-
log
-
session
-
importWritePath
-
skipRootContainerCreation
-
jobName
-
enablePerfLogging
protected boolean enablePerfLogging -
filters
-
listeners
-
importingDocumentFilters
-
rootImportTask
-
DEFAULT_QUEUE_SIZE
protected static final int DEFAULT_QUEUE_SIZE- See Also:
-
queueSize
protected int queueSize -
repositoryName
-
PERF_HEADERS
-
-
Constructor Details
-
GenericMultiThreadedImporter
public GenericMultiThreadedImporter(SourceNode sourceNode, String importWritePath, Boolean skipRootContainerCreation, Integer batchSize, Integer nbThreads, ImporterLogger log, int queueSize) -
GenericMultiThreadedImporter
public GenericMultiThreadedImporter(SourceNode sourceNode, String importWritePath, Boolean skipRootContainerCreation, Integer batchSize, Integer nbThreads, ImporterLogger log) -
GenericMultiThreadedImporter
public GenericMultiThreadedImporter(SourceNode sourceNode, String importWritePath, Integer batchSize, Integer nbThreads, ImporterLogger log) -
GenericMultiThreadedImporter
public GenericMultiThreadedImporter(SourceNode sourceNode, String importWritePath, Boolean skipRootContainerCreation, Integer batchSize, Integer nbThreads, String jobName, ImporterLogger log) -
GenericMultiThreadedImporter
public GenericMultiThreadedImporter(SourceNode sourceNode, String importWritePath, Integer batchSize, Integer nbThreads, String jobName, ImporterLogger log) -
GenericMultiThreadedImporter
-
-
Method Details
-
getExecutor
-
addCreatedDoc
-
getCreatedDocsCounter
public static long getCreatedDocsCounter() -
addFilter
-
addListeners
-
addListeners
-
addImportingDocumentFilters
-
addImportingDocumentFilters
public void addImportingDocumentFilters(Collection<ImportingDocumentFilter> importingDocumentFilters) -
run
public void run() -
setRootImportTask
-
initRootTask
protected GenericThreadedImportTask initRootTask(SourceNode importSource, DocumentModel targetContainer, boolean skipRootContainerCreation, ImporterLogger log, Integer batchSize, String jobName) -
doRun
- Throws:
IOException
-
sleep
protected static void sleep(int millis) -
getTargetContainer
-
createTargetContainer
Creates the target container where the import will // TODO Auto-generated constructor stub }be done. Can be overridden in subclasses. -
getThreadPolicy
-
setThreadPolicy
-
getFactory
-
setFactory
-
setTransactionTimeout
public void setTransactionTimeout(int transactionTimeout) - Since:
- 5.9.4
-
setEnablePerfLogging
public void setEnablePerfLogging(boolean enablePerfLogging) -
stopImportProcrocess
public void stopImportProcrocess()- Specified by:
stopImportProcrocess
in interfaceImporterRunner
-
notifyBeforeImport
protected void notifyBeforeImport() -
notifyAfterImport
protected void notifyAfterImport() -
getRepositoryName
- Since:
- 7.1
-
setRepositoryName
- Since:
- 7.1
-