Class MultiThreadedImportProcessor
java.lang.Object
de.hybris.platform.impex.jalo.imp.DefaultImportProcessor
de.hybris.platform.impex.jalo.imp.MultiThreadedImportProcessor
- All Implemented Interfaces:
ImportProcessor
- Direct Known Subclasses:
ImpExImportJob.MyMultiThreadedImportProcessor
Import processor for
MultiThreadedImpExImportReader. It synchronizes working threads by their existing item
query and (if applicable) by the existing item they're about to change. If multiple workers try to fire the same
existing items query they're synchronized. If multiple workers have same existing items they're synchronized too.- Since:
- 3.1-u7
-
Field Summary
Fields inherited from class de.hybris.platform.impex.jalo.imp.DefaultImportProcessor
CLEARING_MODEL_CONTEXT_AFTER_PROCESSING_EACH_ITEM_ENABLED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected ExistingItemResolvercreateExistingItemsResolver(HeaderDescriptor header, boolean useCache) Overwritten to create a synchronized existing item resolver.protected SessionContextgetCreationContext(ComposedType targetType, Map<StandardColumnDescriptor, Object> attributeValueMappings, ValueLine valueLine) Switching off TA for creation of items in parallel mode due to deadlocks.protected ImpExWorkerprotected booleanlockItems(ImpExWorker worker, Collection<Item> matches) protected voidlockQuery(ImpExWorker worker, QueryParameters queryParameters) processItemData(ValueLine valueLine) Overwritten to release any worker locks after finishing value line processingvoidsetMaxThreads(int max) Methods inherited from class de.hybris.platform.impex.jalo.imp.DefaultImportProcessor
assertTargetTypePermitted, clearModelContextAfterProcessingItem, createCUDHandler, debug, enableLegacyFlagWhenLineIsUsingJaloOnlyFeatures, error, getExistingItemResolver, getHandlerForLine, getLanguage, getReader, getSavedValuesMessage, getValueLineTranslator, handleExceptionDuringImport, hasUnresolvedMandatoryOrInitialColumns, info, init, isDebugEnabled, isInfoEnabled, logExceptionDuringImport, processInsertLine, processInsertLine, processInsertLineInternal, processItemCreation, processItemData_Impl, processItemData_TX, processItemRemoval, processItemUpdate, processRemoveLine, processRemoveLine, processUpdateLine, restoreSessionSettings, shouldRetryAfterException, throwImpExOrRuntimeException, translateValueMappings, warn
-
Constructor Details
-
MultiThreadedImportProcessor
public MultiThreadedImportProcessor()
-
-
Method Details
-
setMaxThreads
public void setMaxThreads(int max) -
getWorker
-
adjustSessionSettings
protected void adjustSessionSettings()- Overrides:
adjustSessionSettingsin classDefaultImportProcessor
-
getCreationContext
protected SessionContext getCreationContext(ComposedType targetType, Map<StandardColumnDescriptor, Object> attributeValueMappings, ValueLine valueLine) Switching off TA for creation of items in parallel mode due to deadlocks.- Overrides:
getCreationContextin classDefaultImportProcessor
-
processItemData
Overwritten to release any worker locks after finishing value line processing- Specified by:
processItemDatain interfaceImportProcessor- Overrides:
processItemDatain classDefaultImportProcessor- Throws:
ImpExException
-
lockQuery
-
lockItems
- Returns:
- true if the worker has been waiting
-
createExistingItemsResolver
protected ExistingItemResolver createExistingItemsResolver(HeaderDescriptor header, boolean useCache) throws HeaderValidationException Overwritten to create a synchronized existing item resolver.- Overrides:
createExistingItemsResolverin classDefaultImportProcessor- Throws:
HeaderValidationException
-