本文整理汇总了Java中org.alfresco.repo.batch.BatchProcessor.getLastError方法的典型用法代码示例。如果您正苦于以下问题:Java BatchProcessor.getLastError方法的具体用法?Java BatchProcessor.getLastError怎么用?Java BatchProcessor.getLastError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.alfresco.repo.batch.BatchProcessor
的用法示例。
在下文中一共展示了BatchProcessor.getLastError方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: bulkImportImpl
import org.alfresco.repo.batch.BatchProcessor; //导入方法依赖的package包/类
/**
* Method that does the work of importing a filesystem using the BatchProcessor.
*
* @param bulkImportParameters The bulk import parameters to apply to this bulk import.
* @param nodeImporter The node importer implementation that will import each node.
* @param lockToken The lock token to use during the bulk import.
*/
@Override
protected void bulkImportImpl(final BulkImportParameters bulkImportParameters, final NodeImporter nodeImporter, final String lockToken)
{
super.bulkImportImpl(bulkImportParameters, nodeImporter, lockToken);
final File sourceFolder = nodeImporter.getSourceFolder();
final int batchSize = getBatchSize(bulkImportParameters);
final int loggingInterval = getLoggingInterval(bulkImportParameters);
final StripingFilesystemTracker tracker = new StripingFilesystemTracker(directoryAnalyser, bulkImportParameters.getTarget(), sourceFolder, batchSize);
final BatchProcessor<ImportableItem> batchProcessor = getBatchProcessor(bulkImportParameters, tracker.getWorkProvider(), loggingInterval);
final BatchProcessor.BatchProcessWorker<ImportableItem> worker = getWorker(bulkImportParameters, lockToken, nodeImporter, tracker);
do
{
batchProcessor.process(worker, true);
if(batchProcessor.getLastError() != null)
{
throw new AlfrescoRuntimeException(batchProcessor.getLastError());
}
}
while(tracker.moreLevels());
}